1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=ALL,SSE,SSE2
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefixes=ALL,SSE,SSE41
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=ALL,AVX
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=ALL,AVX
6 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=ALL,AVX512,AVX512F
7 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl | FileCheck %s --check-prefixes=ALL,AVX512,AVX512VL
8 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512fp16,+avx512vl | FileCheck %s --check-prefixes=ALL,AVX512,AVX512FP16
14 define float @test_v1f32(<1 x float> %a0) {
15 ; ALL-LABEL: test_v1f32:
18 %1 = call nnan float @llvm.vector.reduce.fmax.v1f32(<1 x float> %a0)
22 define float @test_v2f32(<2 x float> %a0) {
23 ; SSE2-LABEL: test_v2f32:
25 ; SSE2-NEXT: movaps %xmm0, %xmm1
26 ; SSE2-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1],xmm0[1,1]
27 ; SSE2-NEXT: maxss %xmm1, %xmm0
30 ; SSE41-LABEL: test_v2f32:
32 ; SSE41-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
33 ; SSE41-NEXT: maxss %xmm1, %xmm0
36 ; AVX-LABEL: test_v2f32:
38 ; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
39 ; AVX-NEXT: vmaxss %xmm1, %xmm0, %xmm0
42 ; AVX512-LABEL: test_v2f32:
44 ; AVX512-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
45 ; AVX512-NEXT: vmaxss %xmm1, %xmm0, %xmm0
47 %1 = call nnan float @llvm.vector.reduce.fmax.v2f32(<2 x float> %a0)
51 define float @test_v4f32(<4 x float> %a0) {
52 ; SSE2-LABEL: test_v4f32:
54 ; SSE2-NEXT: movaps %xmm0, %xmm1
55 ; SSE2-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
56 ; SSE2-NEXT: maxps %xmm1, %xmm0
57 ; SSE2-NEXT: movaps %xmm0, %xmm1
58 ; SSE2-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1],xmm0[1,1]
59 ; SSE2-NEXT: maxss %xmm1, %xmm0
62 ; SSE41-LABEL: test_v4f32:
64 ; SSE41-NEXT: movaps %xmm0, %xmm1
65 ; SSE41-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
66 ; SSE41-NEXT: maxps %xmm1, %xmm0
67 ; SSE41-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
68 ; SSE41-NEXT: maxss %xmm1, %xmm0
71 ; AVX-LABEL: test_v4f32:
73 ; AVX-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
74 ; AVX-NEXT: vmaxps %xmm1, %xmm0, %xmm0
75 ; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
76 ; AVX-NEXT: vmaxss %xmm1, %xmm0, %xmm0
79 ; AVX512-LABEL: test_v4f32:
81 ; AVX512-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
82 ; AVX512-NEXT: vmaxps %xmm1, %xmm0, %xmm0
83 ; AVX512-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
84 ; AVX512-NEXT: vmaxss %xmm1, %xmm0, %xmm0
86 %1 = call nnan float @llvm.vector.reduce.fmax.v4f32(<4 x float> %a0)
90 define float @test_v8f32(<8 x float> %a0) {
91 ; SSE2-LABEL: test_v8f32:
93 ; SSE2-NEXT: maxps %xmm1, %xmm0
94 ; SSE2-NEXT: movaps %xmm0, %xmm1
95 ; SSE2-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
96 ; SSE2-NEXT: maxps %xmm1, %xmm0
97 ; SSE2-NEXT: movaps %xmm0, %xmm1
98 ; SSE2-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1],xmm0[1,1]
99 ; SSE2-NEXT: maxss %xmm1, %xmm0
102 ; SSE41-LABEL: test_v8f32:
104 ; SSE41-NEXT: maxps %xmm1, %xmm0
105 ; SSE41-NEXT: movaps %xmm0, %xmm1
106 ; SSE41-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
107 ; SSE41-NEXT: maxps %xmm1, %xmm0
108 ; SSE41-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
109 ; SSE41-NEXT: maxss %xmm1, %xmm0
112 ; AVX-LABEL: test_v8f32:
114 ; AVX-NEXT: vextractf128 $1, %ymm0, %xmm1
115 ; AVX-NEXT: vmaxps %xmm1, %xmm0, %xmm0
116 ; AVX-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
117 ; AVX-NEXT: vmaxps %xmm1, %xmm0, %xmm0
118 ; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
119 ; AVX-NEXT: vmaxss %xmm1, %xmm0, %xmm0
120 ; AVX-NEXT: vzeroupper
123 ; AVX512-LABEL: test_v8f32:
125 ; AVX512-NEXT: vextractf128 $1, %ymm0, %xmm1
126 ; AVX512-NEXT: vmaxps %xmm1, %xmm0, %xmm0
127 ; AVX512-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
128 ; AVX512-NEXT: vmaxps %xmm1, %xmm0, %xmm0
129 ; AVX512-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
130 ; AVX512-NEXT: vmaxss %xmm1, %xmm0, %xmm0
131 ; AVX512-NEXT: vzeroupper
133 %1 = call nnan float @llvm.vector.reduce.fmax.v8f32(<8 x float> %a0)
137 define float @test_v16f32(<16 x float> %a0) {
138 ; SSE2-LABEL: test_v16f32:
140 ; SSE2-NEXT: maxps %xmm3, %xmm1
141 ; SSE2-NEXT: maxps %xmm2, %xmm0
142 ; SSE2-NEXT: maxps %xmm1, %xmm0
143 ; SSE2-NEXT: movaps %xmm0, %xmm1
144 ; SSE2-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
145 ; SSE2-NEXT: maxps %xmm1, %xmm0
146 ; SSE2-NEXT: movaps %xmm0, %xmm1
147 ; SSE2-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1],xmm0[1,1]
148 ; SSE2-NEXT: maxss %xmm1, %xmm0
151 ; SSE41-LABEL: test_v16f32:
153 ; SSE41-NEXT: maxps %xmm3, %xmm1
154 ; SSE41-NEXT: maxps %xmm2, %xmm0
155 ; SSE41-NEXT: maxps %xmm1, %xmm0
156 ; SSE41-NEXT: movaps %xmm0, %xmm1
157 ; SSE41-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
158 ; SSE41-NEXT: maxps %xmm1, %xmm0
159 ; SSE41-NEXT: movshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
160 ; SSE41-NEXT: maxss %xmm1, %xmm0
163 ; AVX-LABEL: test_v16f32:
165 ; AVX-NEXT: vmaxps %ymm1, %ymm0, %ymm0
166 ; AVX-NEXT: vextractf128 $1, %ymm0, %xmm1
167 ; AVX-NEXT: vmaxps %xmm1, %xmm0, %xmm0
168 ; AVX-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
169 ; AVX-NEXT: vmaxps %xmm1, %xmm0, %xmm0
170 ; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
171 ; AVX-NEXT: vmaxss %xmm1, %xmm0, %xmm0
172 ; AVX-NEXT: vzeroupper
175 ; AVX512-LABEL: test_v16f32:
177 ; AVX512-NEXT: vextractf64x4 $1, %zmm0, %ymm1
178 ; AVX512-NEXT: vmaxps %zmm1, %zmm0, %zmm0
179 ; AVX512-NEXT: vextractf128 $1, %ymm0, %xmm1
180 ; AVX512-NEXT: vmaxps %xmm1, %xmm0, %xmm0
181 ; AVX512-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
182 ; AVX512-NEXT: vmaxps %xmm1, %xmm0, %xmm0
183 ; AVX512-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
184 ; AVX512-NEXT: vmaxss %xmm1, %xmm0, %xmm0
185 ; AVX512-NEXT: vzeroupper
187 %1 = call nnan float @llvm.vector.reduce.fmax.v16f32(<16 x float> %a0)
195 define double @test_v2f64(<2 x double> %a0) {
196 ; SSE-LABEL: test_v2f64:
198 ; SSE-NEXT: movapd %xmm0, %xmm1
199 ; SSE-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
200 ; SSE-NEXT: maxsd %xmm1, %xmm0
203 ; AVX-LABEL: test_v2f64:
205 ; AVX-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
206 ; AVX-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
209 ; AVX512-LABEL: test_v2f64:
211 ; AVX512-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
212 ; AVX512-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
214 %1 = call nnan double @llvm.vector.reduce.fmax.v2f64(<2 x double> %a0)
218 define double @test_v3f64(<3 x double> %a0) {
219 ; SSE2-LABEL: test_v3f64:
221 ; SSE2-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
222 ; SSE2-NEXT: shufpd {{.*#+}} xmm2 = xmm2[0],mem[1]
223 ; SSE2-NEXT: maxpd %xmm2, %xmm0
224 ; SSE2-NEXT: movapd %xmm0, %xmm1
225 ; SSE2-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
226 ; SSE2-NEXT: maxsd %xmm1, %xmm0
229 ; SSE41-LABEL: test_v3f64:
231 ; SSE41-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
232 ; SSE41-NEXT: blendpd {{.*#+}} xmm2 = xmm2[0],mem[1]
233 ; SSE41-NEXT: maxpd %xmm2, %xmm0
234 ; SSE41-NEXT: movapd %xmm0, %xmm1
235 ; SSE41-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
236 ; SSE41-NEXT: maxsd %xmm1, %xmm0
239 ; AVX-LABEL: test_v3f64:
241 ; AVX-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
242 ; AVX-NEXT: vmaxsd %xmm1, %xmm0, %xmm1
243 ; AVX-NEXT: vextractf128 $1, %ymm0, %xmm0
244 ; AVX-NEXT: vmaxsd %xmm0, %xmm1, %xmm0
245 ; AVX-NEXT: vzeroupper
248 ; AVX512-LABEL: test_v3f64:
250 ; AVX512-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
251 ; AVX512-NEXT: vmaxsd %xmm1, %xmm0, %xmm1
252 ; AVX512-NEXT: vextractf128 $1, %ymm0, %xmm0
253 ; AVX512-NEXT: vmaxsd %xmm0, %xmm1, %xmm0
254 ; AVX512-NEXT: vzeroupper
256 %1 = call nnan double @llvm.vector.reduce.fmax.v3f64(<3 x double> %a0)
260 define double @test_v4f64(<4 x double> %a0) {
261 ; SSE-LABEL: test_v4f64:
263 ; SSE-NEXT: maxpd %xmm1, %xmm0
264 ; SSE-NEXT: movapd %xmm0, %xmm1
265 ; SSE-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
266 ; SSE-NEXT: maxsd %xmm1, %xmm0
269 ; AVX-LABEL: test_v4f64:
271 ; AVX-NEXT: vextractf128 $1, %ymm0, %xmm1
272 ; AVX-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
273 ; AVX-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
274 ; AVX-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
275 ; AVX-NEXT: vzeroupper
278 ; AVX512-LABEL: test_v4f64:
280 ; AVX512-NEXT: vextractf128 $1, %ymm0, %xmm1
281 ; AVX512-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
282 ; AVX512-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
283 ; AVX512-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
284 ; AVX512-NEXT: vzeroupper
286 %1 = call nnan double @llvm.vector.reduce.fmax.v4f64(<4 x double> %a0)
290 define double @test_v8f64(<8 x double> %a0) {
291 ; SSE-LABEL: test_v8f64:
293 ; SSE-NEXT: maxpd %xmm3, %xmm1
294 ; SSE-NEXT: maxpd %xmm2, %xmm0
295 ; SSE-NEXT: maxpd %xmm1, %xmm0
296 ; SSE-NEXT: movapd %xmm0, %xmm1
297 ; SSE-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
298 ; SSE-NEXT: maxsd %xmm1, %xmm0
301 ; AVX-LABEL: test_v8f64:
303 ; AVX-NEXT: vmaxpd %ymm1, %ymm0, %ymm0
304 ; AVX-NEXT: vextractf128 $1, %ymm0, %xmm1
305 ; AVX-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
306 ; AVX-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
307 ; AVX-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
308 ; AVX-NEXT: vzeroupper
311 ; AVX512-LABEL: test_v8f64:
313 ; AVX512-NEXT: vextractf64x4 $1, %zmm0, %ymm1
314 ; AVX512-NEXT: vmaxpd %zmm1, %zmm0, %zmm0
315 ; AVX512-NEXT: vextractf128 $1, %ymm0, %xmm1
316 ; AVX512-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
317 ; AVX512-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
318 ; AVX512-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
319 ; AVX512-NEXT: vzeroupper
321 %1 = call nnan double @llvm.vector.reduce.fmax.v8f64(<8 x double> %a0)
325 define double @test_v16f64(<16 x double> %a0) {
326 ; SSE-LABEL: test_v16f64:
328 ; SSE-NEXT: maxpd %xmm6, %xmm2
329 ; SSE-NEXT: maxpd %xmm4, %xmm0
330 ; SSE-NEXT: maxpd %xmm2, %xmm0
331 ; SSE-NEXT: maxpd %xmm7, %xmm3
332 ; SSE-NEXT: maxpd %xmm5, %xmm1
333 ; SSE-NEXT: maxpd %xmm3, %xmm1
334 ; SSE-NEXT: maxpd %xmm1, %xmm0
335 ; SSE-NEXT: movapd %xmm0, %xmm1
336 ; SSE-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
337 ; SSE-NEXT: maxsd %xmm1, %xmm0
340 ; AVX-LABEL: test_v16f64:
342 ; AVX-NEXT: vmaxpd %ymm3, %ymm1, %ymm1
343 ; AVX-NEXT: vmaxpd %ymm2, %ymm0, %ymm0
344 ; AVX-NEXT: vmaxpd %ymm1, %ymm0, %ymm0
345 ; AVX-NEXT: vextractf128 $1, %ymm0, %xmm1
346 ; AVX-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
347 ; AVX-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
348 ; AVX-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
349 ; AVX-NEXT: vzeroupper
352 ; AVX512-LABEL: test_v16f64:
354 ; AVX512-NEXT: vmaxpd %zmm1, %zmm0, %zmm0
355 ; AVX512-NEXT: vextractf64x4 $1, %zmm0, %ymm1
356 ; AVX512-NEXT: vmaxpd %zmm1, %zmm0, %zmm0
357 ; AVX512-NEXT: vextractf128 $1, %ymm0, %xmm1
358 ; AVX512-NEXT: vmaxpd %xmm1, %xmm0, %xmm0
359 ; AVX512-NEXT: vshufpd {{.*#+}} xmm1 = xmm0[1,0]
360 ; AVX512-NEXT: vmaxsd %xmm1, %xmm0, %xmm0
361 ; AVX512-NEXT: vzeroupper
363 %1 = call nnan double @llvm.vector.reduce.fmax.v16f64(<16 x double> %a0)
367 define half @test_v2f16(<2 x half> %a0) nounwind {
368 ; SSE-LABEL: test_v2f16:
370 ; SSE-NEXT: pushq %rbp
371 ; SSE-NEXT: pushq %rbx
372 ; SSE-NEXT: subq $40, %rsp
373 ; SSE-NEXT: movdqa %xmm0, %xmm1
374 ; SSE-NEXT: movdqa %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
375 ; SSE-NEXT: psrld $16, %xmm0
376 ; SSE-NEXT: pextrw $0, %xmm0, %ebx
377 ; SSE-NEXT: pextrw $0, %xmm1, %ebp
378 ; SSE-NEXT: callq __extendhfsf2@PLT
379 ; SSE-NEXT: movd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Folded Spill
380 ; SSE-NEXT: movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
381 ; SSE-NEXT: callq __extendhfsf2@PLT
382 ; SSE-NEXT: ucomiss {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 4-byte Folded Reload
383 ; SSE-NEXT: cmoval %ebp, %ebx
384 ; SSE-NEXT: pinsrw $0, %ebx, %xmm0
385 ; SSE-NEXT: addq $40, %rsp
386 ; SSE-NEXT: popq %rbx
387 ; SSE-NEXT: popq %rbp
390 ; AVX-LABEL: test_v2f16:
392 ; AVX-NEXT: pushq %rbp
393 ; AVX-NEXT: pushq %rbx
394 ; AVX-NEXT: subq $40, %rsp
395 ; AVX-NEXT: vmovdqa %xmm0, %xmm1
396 ; AVX-NEXT: vmovdqa %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
397 ; AVX-NEXT: vpsrld $16, %xmm0, %xmm0
398 ; AVX-NEXT: vpextrw $0, %xmm0, %ebx
399 ; AVX-NEXT: vpextrw $0, %xmm1, %ebp
400 ; AVX-NEXT: callq __extendhfsf2@PLT
401 ; AVX-NEXT: vmovd %xmm0, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Folded Spill
402 ; AVX-NEXT: vmovaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 16-byte Reload
403 ; AVX-NEXT: callq __extendhfsf2@PLT
404 ; AVX-NEXT: vucomiss {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 4-byte Folded Reload
405 ; AVX-NEXT: cmoval %ebp, %ebx
406 ; AVX-NEXT: vpinsrw $0, %ebx, %xmm0, %xmm0
407 ; AVX-NEXT: addq $40, %rsp
408 ; AVX-NEXT: popq %rbx
409 ; AVX-NEXT: popq %rbp
412 ; AVX512F-LABEL: test_v2f16:
414 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
415 ; AVX512F-NEXT: vpsrld $16, %xmm0, %xmm1
416 ; AVX512F-NEXT: vcvtph2ps %xmm0, %xmm2
417 ; AVX512F-NEXT: vcvtph2ps %xmm1, %xmm3
418 ; AVX512F-NEXT: xorl %eax, %eax
419 ; AVX512F-NEXT: vucomiss %xmm3, %xmm2
420 ; AVX512F-NEXT: movl $255, %ecx
421 ; AVX512F-NEXT: cmovbel %eax, %ecx
422 ; AVX512F-NEXT: kmovd %ecx, %k1
423 ; AVX512F-NEXT: vmovdqu16 %zmm0, %zmm1 {%k1}
424 ; AVX512F-NEXT: vmovdqa %xmm1, %xmm0
425 ; AVX512F-NEXT: vzeroupper
428 ; AVX512VL-LABEL: test_v2f16:
430 ; AVX512VL-NEXT: vpsrld $16, %xmm0, %xmm1
431 ; AVX512VL-NEXT: vcvtph2ps %xmm0, %xmm2
432 ; AVX512VL-NEXT: vcvtph2ps %xmm1, %xmm3
433 ; AVX512VL-NEXT: xorl %eax, %eax
434 ; AVX512VL-NEXT: vucomiss %xmm3, %xmm2
435 ; AVX512VL-NEXT: movl $255, %ecx
436 ; AVX512VL-NEXT: cmovbel %eax, %ecx
437 ; AVX512VL-NEXT: kmovd %ecx, %k1
438 ; AVX512VL-NEXT: vmovdqu16 %xmm0, %xmm1 {%k1}
439 ; AVX512VL-NEXT: vmovdqa %xmm1, %xmm0
440 ; AVX512VL-NEXT: retq
442 ; AVX512FP16-LABEL: test_v2f16:
443 ; AVX512FP16: # %bb.0:
444 ; AVX512FP16-NEXT: vpsrld $16, %xmm0, %xmm1
445 ; AVX512FP16-NEXT: vcmpltph %xmm0, %xmm1, %k1
446 ; AVX512FP16-NEXT: vmovsh %xmm0, %xmm0, %xmm1 {%k1}
447 ; AVX512FP16-NEXT: vmovaps %xmm1, %xmm0
448 ; AVX512FP16-NEXT: retq
449 %1 = call nnan half @llvm.vector.reduce.fmax.v2f16(<2 x half> %a0)
452 declare float @llvm.vector.reduce.fmax.v1f32(<1 x float>)
453 declare float @llvm.vector.reduce.fmax.v2f32(<2 x float>)
454 declare float @llvm.vector.reduce.fmax.v4f32(<4 x float>)
455 declare float @llvm.vector.reduce.fmax.v8f32(<8 x float>)
456 declare float @llvm.vector.reduce.fmax.v16f32(<16 x float>)
458 declare double @llvm.vector.reduce.fmax.v2f64(<2 x double>)
459 declare double @llvm.vector.reduce.fmax.v3f64(<3 x double>)
460 declare double @llvm.vector.reduce.fmax.v4f64(<4 x double>)
461 declare double @llvm.vector.reduce.fmax.v8f64(<8 x double>)
462 declare double @llvm.vector.reduce.fmax.v16f64(<16 x double>)
464 declare half @llvm.vector.reduce.fmax.v2f16(<2 x half>)