@@ -115,141 +115,56 @@ int test_mm512_mask_reduce_or_epi32(__mmask16 __M, __m512i __W){
115
115
116
116
double test_mm512_reduce_add_pd (__m512d __W ){
117
117
// CHECK-LABEL: @test_mm512_reduce_add_pd(
118
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
119
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
120
- // CHECK: fadd <4 x double> %{{.*}}, %{{.*}}
121
- // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> undef, <2 x i32> <i32 0, i32 1>
122
- // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> undef, <2 x i32> <i32 2, i32 3>
123
- // CHECK: fadd <2 x double> %{{.*}}, %{{.*}}
124
- // CHECK: shufflevector <2 x double> %{{.*}}, <2 x double> %{{.*}}, <2 x i32> <i32 1, i32 0>
125
- // CHECK: fadd <2 x double> %{{.*}}, %{{.*}}
126
- // CHECK: extractelement <2 x double> %{{.*}}, i32 0
118
+ // CHECK: call double @llvm.vector.reduce.fadd.v8f64(double 0.000000e+00, <8 x double> %{{.*}})
127
119
return _mm512_reduce_add_pd (__W );
128
120
}
129
121
130
122
double test_mm512_reduce_mul_pd (__m512d __W ){
131
123
// CHECK-LABEL: @test_mm512_reduce_mul_pd(
132
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
133
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
134
- // CHECK: fmul <4 x double> %{{.*}}, %{{.*}}
135
- // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> undef, <2 x i32> <i32 0, i32 1>
136
- // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> undef, <2 x i32> <i32 2, i32 3>
137
- // CHECK: fmul <2 x double> %{{.*}}, %{{.*}}
138
- // CHECK: shufflevector <2 x double> %{{.*}}, <2 x double> %{{.*}}, <2 x i32> <i32 1, i32 0>
139
- // CHECK: fmul <2 x double> %{{.*}}, %{{.*}}
140
- // CHECK: extractelement <2 x double> %{{.*}}, i32 0
124
+ // CHECK: call double @llvm.vector.reduce.fmul.v8f64(double 1.000000e+00, <8 x double> %{{.*}})
141
125
return _mm512_reduce_mul_pd (__W );
142
126
}
143
127
144
128
float test_mm512_reduce_add_ps (__m512 __W ){
145
129
// CHECK-LABEL: @test_mm512_reduce_add_ps(
146
- // CHECK: bitcast <16 x float> %{{.*}} to <8 x double>
147
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
148
- // CHECK: bitcast <4 x double> %{{.*}} to <8 x float>
149
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
150
- // CHECK: bitcast <4 x double> %{{.*}} to <8 x float>
151
- // CHECK: fadd <8 x float> %{{.*}}, %{{.*}}
152
- // CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
153
- // CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
154
- // CHECK: fadd <4 x float> %{{.*}}, %{{.*}}
155
- // CHECK: shufflevector <4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
156
- // CHECK: fadd <4 x float> %{{.*}}, %{{.*}}
157
- // CHECK: shufflevector <4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
158
- // CHECK: fadd <4 x float> %{{.*}}, %{{.*}}
159
- // CHECK: extractelement <4 x float> %{{.*}}, i32 0
130
+ // CHECK: call float @llvm.vector.reduce.fadd.v16f32(float 0.000000e+00, <16 x float> %{{.*}})
160
131
return _mm512_reduce_add_ps (__W );
161
132
}
162
133
163
134
float test_mm512_reduce_mul_ps (__m512 __W ){
164
135
// CHECK-LABEL: @test_mm512_reduce_mul_ps(
165
- // CHECK: bitcast <16 x float> %{{.*}} to <8 x double>
166
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
167
- // CHECK: bitcast <4 x double> %{{.*}} to <8 x float>
168
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
169
- // CHECK: bitcast <4 x double> %{{.*}} to <8 x float>
170
- // CHECK: fmul <8 x float> %{{.*}}, %{{.*}}
171
- // CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
172
- // CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
173
- // CHECK: fmul <4 x float> %{{.*}}, %{{.*}}
174
- // CHECK: shufflevector <4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
175
- // CHECK: fmul <4 x float> %{{.*}}, %{{.*}}
176
- // CHECK: shufflevector <4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
177
- // CHECK: fmul <4 x float> %{{.*}}, %{{.*}}
178
- // CHECK: extractelement <4 x float> %{{.*}}, i32 0
136
+ // CHECK: call float @llvm.vector.reduce.fmul.v16f32(float 1.000000e+00, <16 x float> %{{.*}})
179
137
return _mm512_reduce_mul_ps (__W );
180
138
}
181
139
182
140
double test_mm512_mask_reduce_add_pd (__mmask8 __M , __m512d __W ){
183
141
// CHECK-LABEL: @test_mm512_mask_reduce_add_pd(
184
142
// CHECK: bitcast i8 %{{.*}} to <8 x i1>
185
143
// CHECK: select <8 x i1> %{{.*}}, <8 x double> %{{.*}}, <8 x double> %{{.*}}
186
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
187
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
188
- // CHECK: fadd <4 x double> %{{.*}}, %{{.*}}
189
- // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> undef, <2 x i32> <i32 0, i32 1>
190
- // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> undef, <2 x i32> <i32 2, i32 3>
191
- // CHECK: fadd <2 x double> %{{.*}}, %{{.*}}
192
- // CHECK: shufflevector <2 x double> %{{.*}}, <2 x double> %{{.*}}, <2 x i32> <i32 1, i32 0>
193
- // CHECK: fadd <2 x double> %{{.*}}, %{{.*}}
194
- // CHECK: extractelement <2 x double> %{{.*}}, i32 0
144
+ // CHECK: call double @llvm.vector.reduce.fadd.v8f64(double 0.000000e+00, <8 x double> %{{.*}})
195
145
return _mm512_mask_reduce_add_pd (__M , __W );
196
146
}
197
147
198
148
double test_mm512_mask_reduce_mul_pd (__mmask8 __M , __m512d __W ){
199
149
// CHECK-LABEL: @test_mm512_mask_reduce_mul_pd(
200
150
// CHECK: bitcast i8 %{{.*}} to <8 x i1>
201
151
// CHECK: select <8 x i1> %{{.*}}, <8 x double> %{{.*}}, <8 x double> %{{.*}}
202
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
203
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
204
- // CHECK: fmul <4 x double> %{{.*}}, %{{.*}}
205
- // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> undef, <2 x i32> <i32 0, i32 1>
206
- // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> undef, <2 x i32> <i32 2, i32 3>
207
- // CHECK: fmul <2 x double> %{{.*}}, %{{.*}}
208
- // CHECK: shufflevector <2 x double> %{{.*}}, <2 x double> %{{.*}}, <2 x i32> <i32 1, i32 0>
209
- // CHECK: fmul <2 x double> %{{.*}}, %{{.*}}
210
- // CHECK: extractelement <2 x double> %{{.*}}, i32 0
152
+ // CHECK: call double @llvm.vector.reduce.fmul.v8f64(double 1.000000e+00, <8 x double> %{{.*}})
211
153
return _mm512_mask_reduce_mul_pd (__M , __W );
212
154
}
213
155
214
156
float test_mm512_mask_reduce_add_ps (__mmask16 __M , __m512 __W ){
215
157
// CHECK-LABEL: @test_mm512_mask_reduce_add_ps(
216
- // CHECK-NEXT: entry:
217
158
// CHECK: bitcast i16 %{{.*}} to <16 x i1>
218
159
// CHECK: select <16 x i1> %{{.*}}, <16 x float> {{.*}}, <16 x float> {{.*}}
219
- // CHECK: bitcast <16 x float> %{{.*}} to <8 x double>
220
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
221
- // CHECK: bitcast <4 x double> %{{.*}} to <8 x float>
222
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
223
- // CHECK: bitcast <4 x double> %{{.*}} to <8 x float>
224
- // CHECK: fadd <8 x float> %{{.*}}, %{{.*}}
225
- // CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
226
- // CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
227
- // CHECK: fadd <4 x float> %{{.*}}, %{{.*}}
228
- // CHECK: shufflevector <4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
229
- // CHECK: fadd <4 x float> %{{.*}}, %{{.*}}
230
- // CHECK: shufflevector <4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
231
- // CHECK: fadd <4 x float> %{{.*}}, %{{.*}}
232
- // CHECK: extractelement <4 x float> %{{.*}}, i32 0
160
+ // CHECK: call float @llvm.vector.reduce.fadd.v16f32(float 0.000000e+00, <16 x float> %{{.*}})
233
161
return _mm512_mask_reduce_add_ps (__M , __W );
234
162
}
235
163
236
164
float test_mm512_mask_reduce_mul_ps (__mmask16 __M , __m512 __W ){
237
165
// CHECK-LABEL: @test_mm512_mask_reduce_mul_ps(
238
166
// CHECK: bitcast i16 %{{.*}} to <16 x i1>
239
167
// CHECK: select <16 x i1> %{{.*}}, <16 x float> {{.*}}, <16 x float> %{{.*}}
240
- // CHECK: bitcast <16 x float> %{{.*}} to <8 x double>
241
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
242
- // CHECK: bitcast <4 x double> %{{.*}} to <8 x float>
243
- // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
244
- // CHECK: bitcast <4 x double> %{{.*}} to <8 x float>
245
- // CHECK: fmul <8 x float> %{{.*}}, %{{.*}}
246
- // CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
247
- // CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> undef, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
248
- // CHECK: fmul <4 x float> %{{.*}}, %{{.*}}
249
- // CHECK: shufflevector <4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x i32> <i32 2, i32 3, i32 0, i32 1>
250
- // CHECK: fmul <4 x float> %{{.*}}, %{{.*}}
251
- // CHECK: shufflevector <4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
252
- // CHECK: fmul <4 x float> %{{.*}}, %{{.*}}
253
- // CHECK: extractelement <4 x float> %{{.*}}, i32 0
168
+ // CHECK: call float @llvm.vector.reduce.fmul.v16f32(float 1.000000e+00, <16 x float> %{{.*}})
254
169
return _mm512_mask_reduce_mul_ps (__M , __W );
255
170
}
0 commit comments