66//@[s390x_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-feature=+vector
77//@[s390x_vector] needs-llvm-components: systemz
88//@ compile-flags: -Zmerge-functions=disabled
9+ //@ min-llvm-version: 21
910
10- #![ feature( no_core, repr_simd, f128) ]
11+ #![ feature( no_core, repr_simd, f16 , f128) ]
1112#![ cfg_attr( s390x_vector, feature( asm_experimental_reg) ) ]
1213#![ crate_type = "rlib" ]
1314#![ no_core]
@@ -27,6 +28,8 @@ pub struct i32x4([i32; 4]);
2728#[ repr( simd) ]
2829pub struct i64x2 ( [ i64 ; 2 ] ) ;
2930#[ repr( simd) ]
31+ pub struct f16x8 ( [ f16 ; 8 ] ) ;
32+ #[ repr( simd) ]
3033pub struct f32x4 ( [ f32 ; 4 ] ) ;
3134#[ repr( simd) ]
3235pub struct f64x2 ( [ f64 ; 2 ] ) ;
@@ -35,6 +38,7 @@ impl Copy for i8x16 {}
3538impl Copy for i16x8 { }
3639impl Copy for i32x4 { }
3740impl Copy for i64x2 { }
41+ impl Copy for f16x8 { }
3842impl Copy for f32x4 { }
3943impl Copy for f64x2 { }
4044
@@ -127,6 +131,12 @@ check!(reg_i32_addr, i32, reg_addr, "lgr");
127131// CHECK: #NO_APP
128132check ! ( reg_i64_addr, i64 , reg_addr, "lgr" ) ;
129133
134+ // CHECK-LABEL: reg_f16:
135+ // CHECK: #APP
136+ // CHECK: ler %f{{[0-9]+}}, %f{{[0-9]+}}
137+ // CHECK: #NO_APP
138+ check ! ( reg_f16, f16, freg, "ler" ) ;
139+
130140// CHECK-LABEL: reg_f32:
131141// CHECK: #APP
132142// CHECK: ler %f{{[0-9]+}}, %f{{[0-9]+}}
@@ -173,6 +183,13 @@ check!(vreg_i32x4, i32x4, vreg, "vlr");
173183#[ cfg( s390x_vector) ]
174184check ! ( vreg_i64x2, i64x2, vreg, "vlr" ) ;
175185
186+ // s390x_vector-LABEL: vreg_f16x8:
187+ // s390x_vector: #APP
188+ // s390x_vector: vlr %v{{[0-9]+}}, %v{{[0-9]+}}
189+ // s390x_vector: #NO_APP
190+ #[ cfg( s390x_vector) ]
191+ check ! ( vreg_f16x8, f16x8, vreg, "vlr" ) ;
192+
176193// s390x_vector-LABEL: vreg_f32x4:
177194// s390x_vector: #APP
178195// s390x_vector: vlr %v{{[0-9]+}}, %v{{[0-9]+}}
@@ -208,6 +225,13 @@ check!(vreg_i64, i64, vreg, "vlr");
208225#[ cfg( s390x_vector) ]
209226check ! ( vreg_i128, i128 , vreg, "vlr" ) ;
210227
228+ // s390x_vector-LABEL: vreg_f16:
229+ // s390x_vector: #APP
230+ // s390x_vector: vlr %v{{[0-9]+}}, %v{{[0-9]+}}
231+ // s390x_vector: #NO_APP
232+ #[ cfg( s390x_vector) ]
233+ check ! ( vreg_f16, f16, vreg, "vlr" ) ;
234+
211235// s390x_vector-LABEL: vreg_f32:
212236// s390x_vector: #APP
213237// s390x_vector: vlr %v{{[0-9]+}}, %v{{[0-9]+}}
@@ -253,6 +277,12 @@ check_reg!(r0_i32, i32, "r0", "lr");
253277// CHECK: #NO_APP
254278check_reg ! ( r0_i64, i64 , "r0" , "lr" ) ;
255279
280+ // CHECK-LABEL: f0_f16:
281+ // CHECK: #APP
282+ // CHECK: ler %f0, %f0
283+ // CHECK: #NO_APP
284+ check_reg ! ( f0_f16, f16, "f0" , "ler" ) ;
285+
256286// CHECK-LABEL: f0_f32:
257287// CHECK: #APP
258288// CHECK: ler %f0, %f0
@@ -293,6 +323,13 @@ check_reg!(v0_i32x4, i32x4, "v0", "vlr");
293323#[ cfg( s390x_vector) ]
294324check_reg ! ( v0_i64x2, i64x2, "v0" , "vlr" ) ;
295325
326+ // s390x_vector-LABEL: v0_f16x8:
327+ // s390x_vector: #APP
328+ // s390x_vector: vlr %v0, %v0
329+ // s390x_vector: #NO_APP
330+ #[ cfg( s390x_vector) ]
331+ check_reg ! ( v0_f16x8, f16x8, "v0" , "vlr" ) ;
332+
296333// s390x_vector-LABEL: v0_f32x4:
297334// s390x_vector: #APP
298335// s390x_vector: vlr %v0, %v0
@@ -328,6 +365,13 @@ check_reg!(v0_i64, i64, "v0", "vlr");
328365#[ cfg( s390x_vector) ]
329366check_reg ! ( v0_i128, i128 , "v0" , "vlr" ) ;
330367
368+ // s390x_vector-LABEL: v0_f16:
369+ // s390x_vector: #APP
370+ // s390x_vector: vlr %v0, %v0
371+ // s390x_vector: #NO_APP
372+ #[ cfg( s390x_vector) ]
373+ check_reg ! ( v0_f16, f16, "v0" , "vlr" ) ;
374+
331375// s390x_vector-LABEL: v0_f32:
332376// s390x_vector: #APP
333377// s390x_vector: vlr %v0, %v0
0 commit comments