1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512f | FileCheck %s --check-prefixes=CHECK,AVX512F
3 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=CHECK,AVX512DQ
4 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512f,+avx512vl,+avx512dq | FileCheck %s --check-prefixes=CHECK,AVX512DQVL
6 define <4 x i64> @PR32546(<8 x float> %a, <8 x float> %b, <8 x float> %c, <8 x float> %d) {
7 ; AVX512F-LABEL: PR32546:
8 ; AVX512F: ## %bb.0: ## %entry
9 ; AVX512F-NEXT: ## kill: def $ymm3 killed $ymm3 def $zmm3
10 ; AVX512F-NEXT: ## kill: def $ymm2 killed $ymm2 def $zmm2
11 ; AVX512F-NEXT: ## kill: def $ymm1 killed $ymm1 def $zmm1
12 ; AVX512F-NEXT: ## kill: def $ymm0 killed $ymm0 def $zmm0
13 ; AVX512F-NEXT: vcmpltps %zmm3, %zmm2, %k1
14 ; AVX512F-NEXT: vcmpltps %zmm1, %zmm0, %k0 {%k1}
15 ; AVX512F-NEXT: kmovw %k0, %eax
16 ; AVX512F-NEXT: movzbl %al, %eax
17 ; AVX512F-NEXT: vmovd %eax, %xmm0
18 ; AVX512F-NEXT: vpbroadcastd %xmm0, %ymm0
21 ; AVX512DQ-LABEL: PR32546:
22 ; AVX512DQ: ## %bb.0: ## %entry
23 ; AVX512DQ-NEXT: ## kill: def $ymm3 killed $ymm3 def $zmm3
24 ; AVX512DQ-NEXT: ## kill: def $ymm2 killed $ymm2 def $zmm2
25 ; AVX512DQ-NEXT: ## kill: def $ymm1 killed $ymm1 def $zmm1
26 ; AVX512DQ-NEXT: ## kill: def $ymm0 killed $ymm0 def $zmm0
27 ; AVX512DQ-NEXT: vcmpltps %zmm3, %zmm2, %k1
28 ; AVX512DQ-NEXT: vcmpltps %zmm1, %zmm0, %k0 {%k1}
29 ; AVX512DQ-NEXT: kmovb %k0, %eax
30 ; AVX512DQ-NEXT: vmovd %eax, %xmm0
31 ; AVX512DQ-NEXT: vpbroadcastd %xmm0, %ymm0
34 ; AVX512DQVL-LABEL: PR32546:
35 ; AVX512DQVL: ## %bb.0: ## %entry
36 ; AVX512DQVL-NEXT: vcmpltps %ymm3, %ymm2, %k1
37 ; AVX512DQVL-NEXT: vcmpltps %ymm1, %ymm0, %k0 {%k1}
38 ; AVX512DQVL-NEXT: kmovb %k0, %eax
39 ; AVX512DQVL-NEXT: vpbroadcastd %eax, %ymm0
40 ; AVX512DQVL-NEXT: retq
42 %0 = tail call i8 @llvm.x86.avx512.mask.cmp.ps.256(<8 x float> %a, <8 x float> %b, i32 1, i8 -1)
43 %1 = tail call i8 @llvm.x86.avx512.mask.cmp.ps.256(<8 x float> %c, <8 x float> %d, i32 1, i8 -1)
44 %and17 = and i8 %1, %0
45 %and = zext i8 %and17 to i32
46 %2 = insertelement <8 x i32> undef, i32 %and, i32 0
47 %vecinit7.i = shufflevector <8 x i32> %2, <8 x i32> undef, <8 x i32> zeroinitializer
48 %3 = bitcast <8 x i32> %vecinit7.i to <4 x i64>
51 declare i8 @llvm.x86.avx512.mask.cmp.ps.256(<8 x float>, <8 x float>, i32, i8)