@@ -21,55 +21,63 @@ pub struct i8x16([i8; 16]);
21
21
// CHECK-LABEL: dyn_simd_extract
22
22
// CHECK: extractelement <16 x i8> %x, i32 %idx
23
23
#[ no_mangle]
24
+ #[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
24
25
unsafe extern "C" fn dyn_simd_extract ( x : i8x16 , idx : u32 ) -> i8 {
25
26
simd_extract_dyn ( x, idx)
26
27
}
27
28
28
29
// CHECK-LABEL: literal_dyn_simd_extract
29
30
// CHECK: extractelement <16 x i8> %x, i32 7
30
31
#[ no_mangle]
32
+ #[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
31
33
unsafe extern "C" fn literal_dyn_simd_extract ( x : i8x16 ) -> i8 {
32
34
simd_extract_dyn ( x, 7 )
33
35
}
34
36
35
37
// CHECK-LABEL: const_dyn_simd_extract
36
38
// CHECK: extractelement <16 x i8> %x, i32 7
37
39
#[ no_mangle]
40
+ #[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
38
41
unsafe extern "C" fn const_dyn_simd_extract ( x : i8x16 ) -> i8 {
39
42
simd_extract_dyn ( x, const { 3 + 4 } )
40
43
}
41
44
42
45
// CHECK-LABEL: const_simd_extract
43
46
// CHECK: extractelement <16 x i8> %x, i32 7
44
47
#[ no_mangle]
48
+ #[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
45
49
unsafe extern "C" fn const_simd_extract ( x : i8x16 ) -> i8 {
46
50
simd_extract ( x, const { 3 + 4 } )
47
51
}
48
52
49
53
// CHECK-LABEL: dyn_simd_insert
50
54
// CHECK: insertelement <16 x i8> %x, i8 %e, i32 %idx
51
55
#[ no_mangle]
56
+ #[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
52
57
unsafe extern "C" fn dyn_simd_insert ( x : i8x16 , e : i8 , idx : u32 ) -> i8x16 {
53
58
simd_insert_dyn ( x, idx, e)
54
59
}
55
60
56
61
// CHECK-LABEL: literal_dyn_simd_insert
57
62
// CHECK: insertelement <16 x i8> %x, i8 %e, i32 7
58
63
#[ no_mangle]
64
+ #[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
59
65
unsafe extern "C" fn literal_dyn_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
60
66
simd_insert_dyn ( x, 7 , e)
61
67
}
62
68
63
69
// CHECK-LABEL: const_dyn_simd_insert
64
70
// CHECK: insertelement <16 x i8> %x, i8 %e, i32 7
65
71
#[ no_mangle]
72
+ #[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
66
73
unsafe extern "C" fn const_dyn_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
67
74
simd_insert_dyn ( x, const { 3 + 4 } , e)
68
75
}
69
76
70
77
// CHECK-LABEL: const_simd_insert
71
78
// CHECK: insertelement <16 x i8> %x, i8 %e, i32 7
72
79
#[ no_mangle]
80
+ #[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
73
81
unsafe extern "C" fn const_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
74
82
simd_insert ( x, const { 3 + 4 } , e)
75
83
}
0 commit comments