5
5
repr_simd,
6
6
arm_target_feature,
7
7
mips_target_feature,
8
- s390x_target_feature
8
+ s390x_target_feature,
9
+ riscv_target_feature
9
10
) ]
10
11
#![ no_std]
11
12
#![ crate_type = "lib" ]
@@ -25,97 +26,105 @@ pub struct u32x16([u32; 16]);
25
26
pub struct i8x16 ( [ i8 ; 16 ] ) ;
26
27
27
28
// CHECK-LABEL: dyn_simd_extract
28
- // CHECK: extractelement <16 x i8> %x , i32 %idx
29
+ // CHECK: extractelement <16 x i8> %[[TEMP:.+]] , i32 %idx
29
30
#[ no_mangle]
30
31
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
31
32
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
32
33
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
33
34
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
34
35
#[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
36
+ #[ cfg_attr( target_arch = "riscv64" , target_feature( enable = "v" ) ) ]
35
37
unsafe extern "C" fn dyn_simd_extract ( x : i8x16 , idx : u32 ) -> i8 {
36
38
simd_extract_dyn ( x, idx)
37
39
}
38
40
39
41
// CHECK-LABEL: literal_dyn_simd_extract
40
- // CHECK: extractelement <16 x i8> %x , i32 7
42
+ // CHECK: extractelement <16 x i8> %[[TEMP:.+]] , i32 7
41
43
#[ no_mangle]
42
44
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
43
45
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
44
46
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
45
47
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
46
48
#[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
49
+ #[ cfg_attr( target_arch = "riscv64" , target_feature( enable = "v" ) ) ]
47
50
unsafe extern "C" fn literal_dyn_simd_extract ( x : i8x16 ) -> i8 {
48
51
simd_extract_dyn ( x, 7 )
49
52
}
50
53
51
54
// CHECK-LABEL: const_dyn_simd_extract
52
- // CHECK: extractelement <16 x i8> %x , i32 7
55
+ // CHECK: extractelement <16 x i8> %[[TEMP:.+]] , i32 7
53
56
#[ no_mangle]
54
57
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
55
58
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
56
59
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
57
60
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
58
61
#[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
62
+ #[ cfg_attr( target_arch = "riscv64" , target_feature( enable = "v" ) ) ]
59
63
unsafe extern "C" fn const_dyn_simd_extract ( x : i8x16 ) -> i8 {
60
64
simd_extract_dyn ( x, const { 3 + 4 } )
61
65
}
62
66
63
67
// CHECK-LABEL: const_simd_extract
64
- // CHECK: extractelement <16 x i8> %x , i32 7
68
+ // CHECK: extractelement <16 x i8> %[[TEMP:.+]] , i32 7
65
69
#[ no_mangle]
66
70
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
67
71
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
68
72
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
69
73
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
70
74
#[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
75
+ #[ cfg_attr( target_arch = "riscv64" , target_feature( enable = "v" ) ) ]
71
76
unsafe extern "C" fn const_simd_extract ( x : i8x16 ) -> i8 {
72
77
simd_extract ( x, const { 3 + 4 } )
73
78
}
74
79
75
80
// CHECK-LABEL: dyn_simd_insert
76
- // CHECK: insertelement <16 x i8> %x , i8 %e, i32 %idx
81
+ // CHECK: insertelement <16 x i8> %[[TEMP:.+]] , i8 %e, i32 %idx
77
82
#[ no_mangle]
78
83
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
79
84
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
80
85
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
81
86
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
82
87
#[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
88
+ #[ cfg_attr( target_arch = "riscv64" , target_feature( enable = "v" ) ) ]
83
89
unsafe extern "C" fn dyn_simd_insert ( x : i8x16 , e : i8 , idx : u32 ) -> i8x16 {
84
90
simd_insert_dyn ( x, idx, e)
85
91
}
86
92
87
93
// CHECK-LABEL: literal_dyn_simd_insert
88
- // CHECK: insertelement <16 x i8> %x , i8 %e, i32 7
94
+ // CHECK: insertelement <16 x i8> %[[TEMP:.+]] , i8 %e, i32 7
89
95
#[ no_mangle]
90
96
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
91
97
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
92
98
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
93
99
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
94
100
#[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
101
+ #[ cfg_attr( target_arch = "riscv64" , target_feature( enable = "v" ) ) ]
95
102
unsafe extern "C" fn literal_dyn_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
96
103
simd_insert_dyn ( x, 7 , e)
97
104
}
98
105
99
106
// CHECK-LABEL: const_dyn_simd_insert
100
- // CHECK: insertelement <16 x i8> %x , i8 %e, i32 7
107
+ // CHECK: insertelement <16 x i8> %[[TEMP:.+]] , i8 %e, i32 7
101
108
#[ no_mangle]
102
109
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
103
110
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
104
111
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
105
112
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
106
113
#[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
114
+ #[ cfg_attr( target_arch = "riscv64" , target_feature( enable = "v" ) ) ]
107
115
unsafe extern "C" fn const_dyn_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
108
116
simd_insert_dyn ( x, const { 3 + 4 } , e)
109
117
}
110
118
111
119
// CHECK-LABEL: const_simd_insert
112
- // CHECK: insertelement <16 x i8> %x , i8 %e, i32 7
120
+ // CHECK: insertelement <16 x i8> %[[TEMP:.+]] , i8 %e, i32 7
113
121
#[ no_mangle]
114
122
#[ cfg_attr( target_family = "wasm" , target_feature( enable = "simd128" ) ) ]
115
123
#[ cfg_attr( target_arch = "arm" , target_feature( enable = "neon" ) ) ]
116
124
#[ cfg_attr( target_arch = "x86" , target_feature( enable = "sse" ) ) ]
117
125
#[ cfg_attr( target_arch = "mips" , target_feature( enable = "msa" ) ) ]
118
126
#[ cfg_attr( target_arch = "s390x" , target_feature( enable = "vector" ) ) ]
127
+ #[ cfg_attr( target_arch = "riscv64" , target_feature( enable = "v" ) ) ]
119
128
unsafe extern "C" fn const_simd_insert ( x : i8x16 , e : i8 ) -> i8x16 {
120
129
simd_insert ( x, const { 3 + 4 } , e)
121
130
}
0 commit comments