1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefix=AVX512F
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bw | FileCheck %s --check-prefix=AVX512BW
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vpopcntdq | FileCheck %s --check-prefixes=AVX512VPOPCNTDQ,AVX512VPOPCNTDQ-NOBW
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vpopcntdq,+avx512bw | FileCheck %s --check-prefixes=AVX512VPOPCNTDQ,AVX512VPOPCNTDQ-BW
6 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bitalg | FileCheck %s --check-prefix=BITALG
9 define <64 x i8> @ugt_1_v64i8(<64 x i8> %0) {
10 ; AVX512F-LABEL: ugt_1_v64i8:
12 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13 ; AVX512F-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
14 ; AVX512F-NEXT: vpaddb %ymm2, %ymm1, %ymm3
15 ; AVX512F-NEXT: vpand %ymm3, %ymm1, %ymm1
16 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
17 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm1, %ymm1
18 ; AVX512F-NEXT: vpaddb %ymm2, %ymm0, %ymm2
19 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
20 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
21 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
22 ; AVX512F-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
25 ; AVX512BW-LABEL: ugt_1_v64i8:
27 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
28 ; AVX512BW-NEXT: vpaddb %zmm1, %zmm0, %zmm1
29 ; AVX512BW-NEXT: vptestmb %zmm1, %zmm0, %k0
30 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
33 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_1_v64i8:
34 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
35 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm1
36 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
37 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm1, %ymm3
38 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm3, %ymm1, %ymm1
39 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpxor %xmm3, %xmm3, %xmm3
40 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm1, %ymm1
41 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm0, %ymm2
42 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm2, %ymm0, %ymm0
43 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
44 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
45 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
46 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
48 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_1_v64i8:
49 ; AVX512VPOPCNTDQ-BW: # %bb.0:
50 ; AVX512VPOPCNTDQ-BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
51 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm1, %zmm0, %zmm1
52 ; AVX512VPOPCNTDQ-BW-NEXT: vptestmb %zmm1, %zmm0, %k0
53 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
54 ; AVX512VPOPCNTDQ-BW-NEXT: retq
56 ; BITALG-LABEL: ugt_1_v64i8:
58 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
59 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
60 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
62 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
63 %3 = icmp ugt <64 x i8> %2, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
64 %4 = sext <64 x i1> %3 to <64 x i8>
68 define <64 x i8> @ult_2_v64i8(<64 x i8> %0) {
69 ; AVX512F-LABEL: ult_2_v64i8:
71 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
72 ; AVX512F-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
73 ; AVX512F-NEXT: vpaddb %ymm2, %ymm1, %ymm3
74 ; AVX512F-NEXT: vpand %ymm3, %ymm1, %ymm1
75 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
76 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm1, %ymm1
77 ; AVX512F-NEXT: vpaddb %ymm2, %ymm0, %ymm2
78 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
79 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
80 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
83 ; AVX512BW-LABEL: ult_2_v64i8:
85 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
86 ; AVX512BW-NEXT: vpaddb %zmm1, %zmm0, %zmm1
87 ; AVX512BW-NEXT: vptestnmb %zmm1, %zmm0, %k0
88 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
91 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_2_v64i8:
92 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
93 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm1
94 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
95 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm1, %ymm3
96 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm3, %ymm1, %ymm1
97 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpxor %xmm3, %xmm3, %xmm3
98 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm1, %ymm1
99 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm0, %ymm2
100 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm2, %ymm0, %ymm0
101 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
102 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
103 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
105 ; AVX512VPOPCNTDQ-BW-LABEL: ult_2_v64i8:
106 ; AVX512VPOPCNTDQ-BW: # %bb.0:
107 ; AVX512VPOPCNTDQ-BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
108 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm1, %zmm0, %zmm1
109 ; AVX512VPOPCNTDQ-BW-NEXT: vptestnmb %zmm1, %zmm0, %k0
110 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
111 ; AVX512VPOPCNTDQ-BW-NEXT: retq
113 ; BITALG-LABEL: ult_2_v64i8:
115 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
116 ; BITALG-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
117 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
119 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
120 %3 = icmp ult <64 x i8> %2, <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
121 %4 = sext <64 x i1> %3 to <64 x i8>
125 define <64 x i8> @ugt_2_v64i8(<64 x i8> %0) {
126 ; AVX512F-LABEL: ugt_2_v64i8:
128 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
129 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
130 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
131 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
132 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
133 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
134 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
135 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
136 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
137 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
138 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
139 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
140 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
141 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
142 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
143 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
144 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
145 ; AVX512F-NEXT: vpcmpgtb %ymm1, %ymm0, %ymm0
146 ; AVX512F-NEXT: vpcmpgtb %ymm1, %ymm2, %ymm1
147 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
150 ; AVX512BW-LABEL: ugt_2_v64i8:
152 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
153 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
154 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
155 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
156 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
157 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
158 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
159 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
160 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
161 ; AVX512BW-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
162 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
163 ; AVX512BW-NEXT: retq
165 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_2_v64i8:
166 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
167 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
168 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
169 ; AVX512VPOPCNTDQ-NOBW-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
170 ; AVX512VPOPCNTDQ-NOBW-NEXT: # ymm3 = mem[0,1,0,1]
171 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
172 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
173 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
174 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
175 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
176 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
177 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
178 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
179 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
180 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
181 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
182 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
183 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
184 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm1, %ymm0, %ymm0
185 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm1, %ymm2, %ymm1
186 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
187 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
189 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_2_v64i8:
190 ; AVX512VPOPCNTDQ-BW: # %bb.0:
191 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
192 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
193 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
194 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
195 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
196 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
197 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
198 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
199 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
200 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
201 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
202 ; AVX512VPOPCNTDQ-BW-NEXT: retq
204 ; BITALG-LABEL: ugt_2_v64i8:
206 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
207 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
208 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
210 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
211 %3 = icmp ugt <64 x i8> %2, <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
212 %4 = sext <64 x i1> %3 to <64 x i8>
216 define <64 x i8> @ult_3_v64i8(<64 x i8> %0) {
217 ; AVX512F-LABEL: ult_3_v64i8:
219 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
220 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
221 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
222 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
223 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
224 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
225 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
226 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
227 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
228 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
229 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
230 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
231 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
232 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
233 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
234 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
235 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
236 ; AVX512F-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
237 ; AVX512F-NEXT: vpcmpgtb %ymm2, %ymm1, %ymm1
238 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
241 ; AVX512BW-LABEL: ult_3_v64i8:
243 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
244 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
245 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
246 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
247 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
248 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
249 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
250 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
251 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
252 ; AVX512BW-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
253 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
254 ; AVX512BW-NEXT: retq
256 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_3_v64i8:
257 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
258 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
259 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
260 ; AVX512VPOPCNTDQ-NOBW-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
261 ; AVX512VPOPCNTDQ-NOBW-NEXT: # ymm3 = mem[0,1,0,1]
262 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
263 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
264 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
265 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
266 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
267 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
268 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
269 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
270 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
271 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
272 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
273 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
274 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
275 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
276 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm2, %ymm1, %ymm1
277 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
278 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
280 ; AVX512VPOPCNTDQ-BW-LABEL: ult_3_v64i8:
281 ; AVX512VPOPCNTDQ-BW: # %bb.0:
282 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
283 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
284 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
285 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
286 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
287 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
288 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
289 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
290 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
291 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
292 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
293 ; AVX512VPOPCNTDQ-BW-NEXT: retq
295 ; BITALG-LABEL: ult_3_v64i8:
297 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
298 ; BITALG-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
299 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
301 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
302 %3 = icmp ult <64 x i8> %2, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
303 %4 = sext <64 x i1> %3 to <64 x i8>
307 define <64 x i8> @ugt_3_v64i8(<64 x i8> %0) {
308 ; AVX512F-LABEL: ugt_3_v64i8:
310 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
311 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
312 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
313 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
314 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
315 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
316 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
317 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
318 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
319 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
320 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
321 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
322 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
323 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
324 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
325 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
326 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
327 ; AVX512F-NEXT: vpcmpgtb %ymm1, %ymm0, %ymm0
328 ; AVX512F-NEXT: vpcmpgtb %ymm1, %ymm2, %ymm1
329 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
332 ; AVX512BW-LABEL: ugt_3_v64i8:
334 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
335 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
336 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
337 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
338 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
339 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
340 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
341 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
342 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
343 ; AVX512BW-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
344 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
345 ; AVX512BW-NEXT: retq
347 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_3_v64i8:
348 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
349 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
350 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
351 ; AVX512VPOPCNTDQ-NOBW-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
352 ; AVX512VPOPCNTDQ-NOBW-NEXT: # ymm3 = mem[0,1,0,1]
353 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
354 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
355 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
356 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
357 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
358 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
359 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
360 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
361 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
362 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
363 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
364 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
365 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
366 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm1, %ymm0, %ymm0
367 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm1, %ymm2, %ymm1
368 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
369 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
371 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_3_v64i8:
372 ; AVX512VPOPCNTDQ-BW: # %bb.0:
373 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
374 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
375 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
376 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
377 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
378 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
379 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
380 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
381 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
382 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
383 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
384 ; AVX512VPOPCNTDQ-BW-NEXT: retq
386 ; BITALG-LABEL: ugt_3_v64i8:
388 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
389 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
390 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
392 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
393 %3 = icmp ugt <64 x i8> %2, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
394 %4 = sext <64 x i1> %3 to <64 x i8>
398 define <64 x i8> @ult_4_v64i8(<64 x i8> %0) {
399 ; AVX512F-LABEL: ult_4_v64i8:
401 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
402 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
403 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
404 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
405 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
406 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
407 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
408 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
409 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
410 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
411 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
412 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
413 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
414 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
415 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
416 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
417 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
418 ; AVX512F-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
419 ; AVX512F-NEXT: vpcmpgtb %ymm2, %ymm1, %ymm1
420 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
423 ; AVX512BW-LABEL: ult_4_v64i8:
425 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
426 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
427 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
428 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
429 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
430 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
431 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
432 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
433 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
434 ; AVX512BW-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
435 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
436 ; AVX512BW-NEXT: retq
438 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_4_v64i8:
439 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
440 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
441 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
442 ; AVX512VPOPCNTDQ-NOBW-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
443 ; AVX512VPOPCNTDQ-NOBW-NEXT: # ymm3 = mem[0,1,0,1]
444 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
445 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
446 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
447 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
448 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
449 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
450 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
451 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
452 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
453 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
454 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
455 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
456 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
457 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
458 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm2, %ymm1, %ymm1
459 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
460 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
462 ; AVX512VPOPCNTDQ-BW-LABEL: ult_4_v64i8:
463 ; AVX512VPOPCNTDQ-BW: # %bb.0:
464 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
465 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
466 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
467 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
468 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
469 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
470 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
471 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
472 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
473 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
474 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
475 ; AVX512VPOPCNTDQ-BW-NEXT: retq
477 ; BITALG-LABEL: ult_4_v64i8:
479 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
480 ; BITALG-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
481 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
483 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
484 %3 = icmp ult <64 x i8> %2, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
485 %4 = sext <64 x i1> %3 to <64 x i8>
489 define <64 x i8> @ugt_4_v64i8(<64 x i8> %0) {
490 ; AVX512F-LABEL: ugt_4_v64i8:
492 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
493 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
494 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
495 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
496 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
497 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
498 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
499 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
500 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
501 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
502 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
503 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
504 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
505 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
506 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
507 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
508 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
509 ; AVX512F-NEXT: vpcmpgtb %ymm1, %ymm0, %ymm0
510 ; AVX512F-NEXT: vpcmpgtb %ymm1, %ymm2, %ymm1
511 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
514 ; AVX512BW-LABEL: ugt_4_v64i8:
516 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
517 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
518 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
519 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
520 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
521 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
522 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
523 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
524 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
525 ; AVX512BW-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
526 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
527 ; AVX512BW-NEXT: retq
529 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_4_v64i8:
530 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
531 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
532 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
533 ; AVX512VPOPCNTDQ-NOBW-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
534 ; AVX512VPOPCNTDQ-NOBW-NEXT: # ymm3 = mem[0,1,0,1]
535 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
536 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
537 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
538 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
539 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
540 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
541 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
542 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
543 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
544 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
545 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
546 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
547 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
548 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm1, %ymm0, %ymm0
549 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm1, %ymm2, %ymm1
550 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
551 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
553 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_4_v64i8:
554 ; AVX512VPOPCNTDQ-BW: # %bb.0:
555 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
556 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
557 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
558 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
559 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
560 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
561 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
562 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
563 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
564 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
565 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
566 ; AVX512VPOPCNTDQ-BW-NEXT: retq
568 ; BITALG-LABEL: ugt_4_v64i8:
570 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
571 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
572 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
574 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
575 %3 = icmp ugt <64 x i8> %2, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
576 %4 = sext <64 x i1> %3 to <64 x i8>
580 define <64 x i8> @ult_5_v64i8(<64 x i8> %0) {
581 ; AVX512F-LABEL: ult_5_v64i8:
583 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
584 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
585 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
586 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
587 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
588 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
589 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
590 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
591 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
592 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
593 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
594 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
595 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
596 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
597 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
598 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
599 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
600 ; AVX512F-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
601 ; AVX512F-NEXT: vpcmpgtb %ymm2, %ymm1, %ymm1
602 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
605 ; AVX512BW-LABEL: ult_5_v64i8:
607 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
608 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
609 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
610 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
611 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
612 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
613 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
614 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
615 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
616 ; AVX512BW-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
617 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
618 ; AVX512BW-NEXT: retq
620 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_5_v64i8:
621 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
622 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
623 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
624 ; AVX512VPOPCNTDQ-NOBW-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
625 ; AVX512VPOPCNTDQ-NOBW-NEXT: # ymm3 = mem[0,1,0,1]
626 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
627 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
628 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
629 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
630 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
631 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
632 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
633 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
634 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
635 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
636 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
637 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
638 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
639 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
640 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm2, %ymm1, %ymm1
641 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
642 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
644 ; AVX512VPOPCNTDQ-BW-LABEL: ult_5_v64i8:
645 ; AVX512VPOPCNTDQ-BW: # %bb.0:
646 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
647 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
648 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
649 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
650 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
651 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
652 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
653 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
654 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
655 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
656 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
657 ; AVX512VPOPCNTDQ-BW-NEXT: retq
659 ; BITALG-LABEL: ult_5_v64i8:
661 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
662 ; BITALG-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
663 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
665 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
666 %3 = icmp ult <64 x i8> %2, <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
667 %4 = sext <64 x i1> %3 to <64 x i8>
671 define <64 x i8> @ugt_5_v64i8(<64 x i8> %0) {
672 ; AVX512F-LABEL: ugt_5_v64i8:
674 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
675 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
676 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
677 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
678 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
679 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
680 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
681 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
682 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
683 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
684 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
685 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
686 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
687 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
688 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
689 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
690 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
691 ; AVX512F-NEXT: vpcmpgtb %ymm1, %ymm0, %ymm0
692 ; AVX512F-NEXT: vpcmpgtb %ymm1, %ymm2, %ymm1
693 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
696 ; AVX512BW-LABEL: ugt_5_v64i8:
698 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
699 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
700 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
701 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
702 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
703 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
704 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
705 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
706 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
707 ; AVX512BW-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
708 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
709 ; AVX512BW-NEXT: retq
711 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_5_v64i8:
712 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
713 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
714 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
715 ; AVX512VPOPCNTDQ-NOBW-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
716 ; AVX512VPOPCNTDQ-NOBW-NEXT: # ymm3 = mem[0,1,0,1]
717 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
718 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
719 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
720 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
721 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
722 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
723 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
724 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
725 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
726 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
727 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
728 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
729 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
730 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm1, %ymm0, %ymm0
731 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm1, %ymm2, %ymm1
732 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
733 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
735 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_5_v64i8:
736 ; AVX512VPOPCNTDQ-BW: # %bb.0:
737 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
738 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
739 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
740 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
741 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
742 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
743 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
744 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
745 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
746 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
747 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
748 ; AVX512VPOPCNTDQ-BW-NEXT: retq
750 ; BITALG-LABEL: ugt_5_v64i8:
752 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
753 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
754 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
756 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
757 %3 = icmp ugt <64 x i8> %2, <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
758 %4 = sext <64 x i1> %3 to <64 x i8>
762 define <64 x i8> @ult_6_v64i8(<64 x i8> %0) {
763 ; AVX512F-LABEL: ult_6_v64i8:
765 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
766 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
767 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
768 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
769 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
770 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
771 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
772 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
773 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
774 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
775 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
776 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
777 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
778 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
779 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
780 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
781 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
782 ; AVX512F-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
783 ; AVX512F-NEXT: vpcmpgtb %ymm2, %ymm1, %ymm1
784 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
787 ; AVX512BW-LABEL: ult_6_v64i8:
789 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
790 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
791 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
792 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
793 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
794 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
795 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
796 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
797 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
798 ; AVX512BW-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
799 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
800 ; AVX512BW-NEXT: retq
802 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_6_v64i8:
803 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
804 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
805 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
806 ; AVX512VPOPCNTDQ-NOBW-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
807 ; AVX512VPOPCNTDQ-NOBW-NEXT: # ymm3 = mem[0,1,0,1]
808 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
809 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
810 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
811 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
812 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
813 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
814 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
815 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
816 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
817 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
818 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
819 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
820 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
821 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
822 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm2, %ymm1, %ymm1
823 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
824 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
826 ; AVX512VPOPCNTDQ-BW-LABEL: ult_6_v64i8:
827 ; AVX512VPOPCNTDQ-BW: # %bb.0:
828 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
829 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
830 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
831 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
832 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
833 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
834 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
835 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
836 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
837 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
838 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
839 ; AVX512VPOPCNTDQ-BW-NEXT: retq
841 ; BITALG-LABEL: ult_6_v64i8:
843 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
844 ; BITALG-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
845 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
847 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
848 %3 = icmp ult <64 x i8> %2, <i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6>
849 %4 = sext <64 x i1> %3 to <64 x i8>
853 define <64 x i8> @ugt_6_v64i8(<64 x i8> %0) {
854 ; AVX512F-LABEL: ugt_6_v64i8:
856 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
857 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
858 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
859 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
860 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
861 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
862 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
863 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
864 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
865 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
866 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
867 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
868 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
869 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
870 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
871 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
872 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
873 ; AVX512F-NEXT: vpcmpgtb %ymm1, %ymm0, %ymm0
874 ; AVX512F-NEXT: vpcmpgtb %ymm1, %ymm2, %ymm1
875 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
878 ; AVX512BW-LABEL: ugt_6_v64i8:
880 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
881 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
882 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
883 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
884 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
885 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
886 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
887 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
888 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
889 ; AVX512BW-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
890 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
891 ; AVX512BW-NEXT: retq
893 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_6_v64i8:
894 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
895 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
896 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
897 ; AVX512VPOPCNTDQ-NOBW-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
898 ; AVX512VPOPCNTDQ-NOBW-NEXT: # ymm3 = mem[0,1,0,1]
899 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
900 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
901 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
902 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
903 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
904 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
905 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
906 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
907 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
908 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
909 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
910 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
911 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
912 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm1, %ymm0, %ymm0
913 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm1, %ymm2, %ymm1
914 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
915 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
917 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_6_v64i8:
918 ; AVX512VPOPCNTDQ-BW: # %bb.0:
919 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
920 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
921 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
922 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
923 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
924 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
925 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
926 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
927 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
928 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
929 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
930 ; AVX512VPOPCNTDQ-BW-NEXT: retq
932 ; BITALG-LABEL: ugt_6_v64i8:
934 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
935 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
936 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
938 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
939 %3 = icmp ugt <64 x i8> %2, <i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6>
940 %4 = sext <64 x i1> %3 to <64 x i8>
944 define <64 x i8> @ult_7_v64i8(<64 x i8> %0) {
945 ; AVX512F-LABEL: ult_7_v64i8:
947 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
948 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
949 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
950 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
951 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
952 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
953 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
954 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
955 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
956 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
957 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
958 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
959 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
960 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
961 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
962 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
963 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
964 ; AVX512F-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
965 ; AVX512F-NEXT: vpcmpgtb %ymm2, %ymm1, %ymm1
966 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
969 ; AVX512BW-LABEL: ult_7_v64i8:
971 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
972 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
973 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
974 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
975 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
976 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
977 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
978 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
979 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
980 ; AVX512BW-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
981 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
982 ; AVX512BW-NEXT: retq
984 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_7_v64i8:
985 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
986 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
987 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
988 ; AVX512VPOPCNTDQ-NOBW-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
989 ; AVX512VPOPCNTDQ-NOBW-NEXT: # ymm3 = mem[0,1,0,1]
990 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
991 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
992 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
993 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
994 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
995 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
996 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
997 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
998 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
999 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
1000 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1001 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1002 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastb {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
1003 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
1004 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtb %ymm2, %ymm1, %ymm1
1005 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1006 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1008 ; AVX512VPOPCNTDQ-BW-LABEL: ult_7_v64i8:
1009 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1010 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1011 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1012 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1013 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1014 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1015 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1016 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1017 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1018 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1019 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1020 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
1021 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1023 ; BITALG-LABEL: ult_7_v64i8:
1025 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
1026 ; BITALG-NEXT: vpcmpltb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1027 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
1029 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
1030 %3 = icmp ult <64 x i8> %2, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
1031 %4 = sext <64 x i1> %3 to <64 x i8>
1035 define <32 x i16> @ugt_1_v32i16(<32 x i16> %0) {
1036 ; AVX512F-LABEL: ugt_1_v32i16:
1038 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
1039 ; AVX512F-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
1040 ; AVX512F-NEXT: vpaddw %ymm2, %ymm1, %ymm3
1041 ; AVX512F-NEXT: vpand %ymm3, %ymm1, %ymm1
1042 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
1043 ; AVX512F-NEXT: vpcmpeqw %ymm3, %ymm1, %ymm1
1044 ; AVX512F-NEXT: vpaddw %ymm2, %ymm0, %ymm2
1045 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
1046 ; AVX512F-NEXT: vpcmpeqw %ymm3, %ymm0, %ymm0
1047 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1048 ; AVX512F-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
1049 ; AVX512F-NEXT: retq
1051 ; AVX512BW-LABEL: ugt_1_v32i16:
1052 ; AVX512BW: # %bb.0:
1053 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
1054 ; AVX512BW-NEXT: vpaddw %zmm1, %zmm0, %zmm1
1055 ; AVX512BW-NEXT: vptestmw %zmm1, %zmm0, %k0
1056 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1057 ; AVX512BW-NEXT: retq
1059 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_1_v32i16:
1060 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1061 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm1
1062 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
1063 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddw %ymm2, %ymm1, %ymm3
1064 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm3, %ymm1, %ymm1
1065 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpxor %xmm3, %xmm3, %xmm3
1066 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqw %ymm3, %ymm1, %ymm1
1067 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddw %ymm2, %ymm0, %ymm2
1068 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm2, %ymm0, %ymm0
1069 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqw %ymm3, %ymm0, %ymm0
1070 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1071 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
1072 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1074 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_1_v32i16:
1075 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1076 ; AVX512VPOPCNTDQ-BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
1077 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddw %zmm1, %zmm0, %zmm1
1078 ; AVX512VPOPCNTDQ-BW-NEXT: vptestmw %zmm1, %zmm0, %k0
1079 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1080 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1082 ; BITALG-LABEL: ugt_1_v32i16:
1084 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1085 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1086 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1088 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1089 %3 = icmp ugt <32 x i16> %2, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
1090 %4 = sext <32 x i1> %3 to <32 x i16>
1094 define <32 x i16> @ult_2_v32i16(<32 x i16> %0) {
1095 ; AVX512F-LABEL: ult_2_v32i16:
1097 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
1098 ; AVX512F-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
1099 ; AVX512F-NEXT: vpaddw %ymm2, %ymm1, %ymm3
1100 ; AVX512F-NEXT: vpand %ymm3, %ymm1, %ymm1
1101 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
1102 ; AVX512F-NEXT: vpcmpeqw %ymm3, %ymm1, %ymm1
1103 ; AVX512F-NEXT: vpaddw %ymm2, %ymm0, %ymm2
1104 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
1105 ; AVX512F-NEXT: vpcmpeqw %ymm3, %ymm0, %ymm0
1106 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1107 ; AVX512F-NEXT: retq
1109 ; AVX512BW-LABEL: ult_2_v32i16:
1110 ; AVX512BW: # %bb.0:
1111 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
1112 ; AVX512BW-NEXT: vpaddw %zmm1, %zmm0, %zmm1
1113 ; AVX512BW-NEXT: vptestnmw %zmm1, %zmm0, %k0
1114 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1115 ; AVX512BW-NEXT: retq
1117 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_2_v32i16:
1118 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1119 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm1
1120 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
1121 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddw %ymm2, %ymm1, %ymm3
1122 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm3, %ymm1, %ymm1
1123 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpxor %xmm3, %xmm3, %xmm3
1124 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqw %ymm3, %ymm1, %ymm1
1125 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddw %ymm2, %ymm0, %ymm2
1126 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm2, %ymm0, %ymm0
1127 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqw %ymm3, %ymm0, %ymm0
1128 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1129 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1131 ; AVX512VPOPCNTDQ-BW-LABEL: ult_2_v32i16:
1132 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1133 ; AVX512VPOPCNTDQ-BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
1134 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddw %zmm1, %zmm0, %zmm1
1135 ; AVX512VPOPCNTDQ-BW-NEXT: vptestnmw %zmm1, %zmm0, %k0
1136 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1137 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1139 ; BITALG-LABEL: ult_2_v32i16:
1141 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1142 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1143 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1145 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1146 %3 = icmp ult <32 x i16> %2, <i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2>
1147 %4 = sext <32 x i1> %3 to <32 x i16>
1151 define <32 x i16> @ugt_2_v32i16(<32 x i16> %0) {
1152 ; AVX512F-LABEL: ugt_2_v32i16:
1154 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1155 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1156 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1157 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
1158 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1159 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1160 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1161 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1162 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1163 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1164 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1165 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1166 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1167 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1168 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1169 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1170 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1171 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1172 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1173 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1174 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1175 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1176 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
1177 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
1178 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1179 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1180 ; AVX512F-NEXT: retq
1182 ; AVX512BW-LABEL: ugt_2_v32i16:
1183 ; AVX512BW: # %bb.0:
1184 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1185 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1186 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1187 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1188 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1189 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1190 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1191 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1192 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1193 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1194 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1195 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1196 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1197 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1198 ; AVX512BW-NEXT: retq
1200 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_2_v32i16:
1201 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1202 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1203 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1204 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1205 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1206 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1207 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1208 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1209 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
1210 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
1211 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1212 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1213 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1215 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_2_v32i16:
1216 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1217 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1218 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1219 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1220 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1221 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1222 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1223 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1224 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1225 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1226 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1227 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1228 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1229 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1230 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1231 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1233 ; BITALG-LABEL: ugt_2_v32i16:
1235 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1236 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1237 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1239 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1240 %3 = icmp ugt <32 x i16> %2, <i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2>
1241 %4 = sext <32 x i1> %3 to <32 x i16>
1245 define <32 x i16> @ult_3_v32i16(<32 x i16> %0) {
1246 ; AVX512F-LABEL: ult_3_v32i16:
1248 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1249 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1250 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1251 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
1252 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1253 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1254 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1255 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1256 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1257 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1258 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1259 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1260 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1261 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1262 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1263 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1264 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1265 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1266 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1267 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1268 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1269 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1270 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1271 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1272 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1273 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1274 ; AVX512F-NEXT: retq
1276 ; AVX512BW-LABEL: ult_3_v32i16:
1277 ; AVX512BW: # %bb.0:
1278 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1279 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1280 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1281 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1282 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1283 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1284 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1285 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1286 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1287 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1288 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1289 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1290 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1291 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1292 ; AVX512BW-NEXT: retq
1294 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_3_v32i16:
1295 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1296 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1297 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1298 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1299 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1300 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1301 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1302 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1303 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1304 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
1305 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1306 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1307 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1309 ; AVX512VPOPCNTDQ-BW-LABEL: ult_3_v32i16:
1310 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1311 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1312 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1313 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1314 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1315 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1316 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1317 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1318 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1319 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1320 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1321 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1322 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1323 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1324 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1325 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1327 ; BITALG-LABEL: ult_3_v32i16:
1329 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1330 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1331 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1333 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1334 %3 = icmp ult <32 x i16> %2, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1335 %4 = sext <32 x i1> %3 to <32 x i16>
1339 define <32 x i16> @ugt_3_v32i16(<32 x i16> %0) {
1340 ; AVX512F-LABEL: ugt_3_v32i16:
1342 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1343 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1344 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1345 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
1346 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1347 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1348 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1349 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1350 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1351 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1352 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1353 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1354 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1355 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1356 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1357 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1358 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1359 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1360 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1361 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1362 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1363 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1364 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1365 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
1366 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1367 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1368 ; AVX512F-NEXT: retq
1370 ; AVX512BW-LABEL: ugt_3_v32i16:
1371 ; AVX512BW: # %bb.0:
1372 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1373 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1374 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1375 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1376 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1377 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1378 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1379 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1380 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1381 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1382 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1383 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1384 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1385 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1386 ; AVX512BW-NEXT: retq
1388 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_3_v32i16:
1389 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1390 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1391 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1392 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1393 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1394 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1395 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1396 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1397 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1398 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
1399 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1400 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1401 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1403 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_3_v32i16:
1404 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1405 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1406 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1407 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1408 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1409 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1410 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1411 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1412 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1413 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1414 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1415 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1416 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1417 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1418 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1419 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1421 ; BITALG-LABEL: ugt_3_v32i16:
1423 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1424 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1425 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1427 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1428 %3 = icmp ugt <32 x i16> %2, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1429 %4 = sext <32 x i1> %3 to <32 x i16>
1433 define <32 x i16> @ult_4_v32i16(<32 x i16> %0) {
1434 ; AVX512F-LABEL: ult_4_v32i16:
1436 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1437 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1438 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1439 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
1440 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1441 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1442 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1443 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1444 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1445 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1446 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1447 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1448 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1449 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1450 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1451 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1452 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1453 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1454 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1455 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1456 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1457 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1458 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1459 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1460 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1461 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1462 ; AVX512F-NEXT: retq
1464 ; AVX512BW-LABEL: ult_4_v32i16:
1465 ; AVX512BW: # %bb.0:
1466 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1467 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1468 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1469 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1470 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1471 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1472 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1473 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1474 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1475 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1476 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1477 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1478 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1479 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1480 ; AVX512BW-NEXT: retq
1482 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_4_v32i16:
1483 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1484 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1485 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1486 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1487 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1488 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1489 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1490 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1491 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1492 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
1493 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1494 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1495 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1497 ; AVX512VPOPCNTDQ-BW-LABEL: ult_4_v32i16:
1498 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1499 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1500 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1501 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1502 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1503 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1504 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1505 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1506 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1507 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1508 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1509 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1510 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1511 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1512 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1513 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1515 ; BITALG-LABEL: ult_4_v32i16:
1517 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1518 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1519 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1521 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1522 %3 = icmp ult <32 x i16> %2, <i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4>
1523 %4 = sext <32 x i1> %3 to <32 x i16>
1527 define <32 x i16> @ugt_4_v32i16(<32 x i16> %0) {
1528 ; AVX512F-LABEL: ugt_4_v32i16:
1530 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1531 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1532 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1533 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
1534 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1535 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1536 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1537 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1538 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1539 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1540 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1541 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1542 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1543 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1544 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1545 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1546 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1547 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1548 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1549 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1550 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1551 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1552 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1553 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
1554 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1555 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1556 ; AVX512F-NEXT: retq
1558 ; AVX512BW-LABEL: ugt_4_v32i16:
1559 ; AVX512BW: # %bb.0:
1560 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1561 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1562 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1563 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1564 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1565 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1566 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1567 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1568 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1569 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1570 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1571 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1572 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1573 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1574 ; AVX512BW-NEXT: retq
1576 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_4_v32i16:
1577 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1578 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1579 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1580 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1581 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1582 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1583 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1584 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1585 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1586 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
1587 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1588 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1589 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1591 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_4_v32i16:
1592 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1593 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1594 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1595 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1596 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1597 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1598 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1599 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1600 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1601 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1602 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1603 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1604 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1605 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1606 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1607 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1609 ; BITALG-LABEL: ugt_4_v32i16:
1611 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1612 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1613 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1615 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1616 %3 = icmp ugt <32 x i16> %2, <i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4>
1617 %4 = sext <32 x i1> %3 to <32 x i16>
1621 define <32 x i16> @ult_5_v32i16(<32 x i16> %0) {
1622 ; AVX512F-LABEL: ult_5_v32i16:
1624 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1625 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1626 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1627 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
1628 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1629 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1630 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1631 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1632 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1633 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1634 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1635 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1636 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1637 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1638 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1639 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1640 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1641 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1642 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1643 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1644 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1645 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1646 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1647 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1648 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1649 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1650 ; AVX512F-NEXT: retq
1652 ; AVX512BW-LABEL: ult_5_v32i16:
1653 ; AVX512BW: # %bb.0:
1654 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1655 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1656 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1657 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1658 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1659 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1660 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1661 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1662 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1663 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1664 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1665 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1666 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1667 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1668 ; AVX512BW-NEXT: retq
1670 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_5_v32i16:
1671 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1672 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1673 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1674 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1675 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1676 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1677 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1678 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1679 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1680 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
1681 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1682 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1683 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1685 ; AVX512VPOPCNTDQ-BW-LABEL: ult_5_v32i16:
1686 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1687 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1688 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1689 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1690 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1691 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1692 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1693 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1694 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1695 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1696 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1697 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1698 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1699 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1700 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1701 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1703 ; BITALG-LABEL: ult_5_v32i16:
1705 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1706 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1707 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1709 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1710 %3 = icmp ult <32 x i16> %2, <i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
1711 %4 = sext <32 x i1> %3 to <32 x i16>
1715 define <32 x i16> @ugt_5_v32i16(<32 x i16> %0) {
1716 ; AVX512F-LABEL: ugt_5_v32i16:
1718 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1719 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1720 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1721 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
1722 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1723 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1724 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1725 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1726 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1727 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1728 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1729 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1730 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1731 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1732 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1733 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1734 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1735 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1736 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1737 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1738 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1739 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1740 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1741 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
1742 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1743 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1744 ; AVX512F-NEXT: retq
1746 ; AVX512BW-LABEL: ugt_5_v32i16:
1747 ; AVX512BW: # %bb.0:
1748 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1749 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1750 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1751 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1752 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1753 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1754 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1755 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1756 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1757 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1758 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1759 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1760 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1761 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1762 ; AVX512BW-NEXT: retq
1764 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_5_v32i16:
1765 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1766 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1767 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1768 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1769 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1770 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1771 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1772 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1773 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1774 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
1775 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1776 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1777 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1779 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_5_v32i16:
1780 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1781 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1782 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1783 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1784 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1785 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1786 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1787 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1788 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1789 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1790 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1791 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1792 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1793 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1794 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1795 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1797 ; BITALG-LABEL: ugt_5_v32i16:
1799 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1800 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1801 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1803 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1804 %3 = icmp ugt <32 x i16> %2, <i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
1805 %4 = sext <32 x i1> %3 to <32 x i16>
1809 define <32 x i16> @ult_6_v32i16(<32 x i16> %0) {
1810 ; AVX512F-LABEL: ult_6_v32i16:
1812 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1813 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1814 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1815 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
1816 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1817 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1818 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1819 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1820 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1821 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1822 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1823 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1824 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1825 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1826 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1827 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1828 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1829 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1830 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1831 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1832 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1833 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1834 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1835 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1836 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1837 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1838 ; AVX512F-NEXT: retq
1840 ; AVX512BW-LABEL: ult_6_v32i16:
1841 ; AVX512BW: # %bb.0:
1842 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1843 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1844 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1845 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1846 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1847 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1848 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1849 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1850 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1851 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1852 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1853 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1854 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1855 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1856 ; AVX512BW-NEXT: retq
1858 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_6_v32i16:
1859 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1860 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1861 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1862 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1863 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1864 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1865 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1866 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1867 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1868 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
1869 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1870 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1871 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1873 ; AVX512VPOPCNTDQ-BW-LABEL: ult_6_v32i16:
1874 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1875 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1876 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1877 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1878 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1879 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1880 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1881 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1882 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1883 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1884 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1885 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1886 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1887 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1888 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1889 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1891 ; BITALG-LABEL: ult_6_v32i16:
1893 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1894 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1895 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1897 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1898 %3 = icmp ult <32 x i16> %2, <i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6>
1899 %4 = sext <32 x i1> %3 to <32 x i16>
1903 define <32 x i16> @ugt_6_v32i16(<32 x i16> %0) {
1904 ; AVX512F-LABEL: ugt_6_v32i16:
1906 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1907 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1908 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1909 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
1910 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1911 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1912 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1913 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1914 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1915 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1916 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1917 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1918 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1919 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1920 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1921 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1922 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1923 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1924 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1925 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1926 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1927 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1928 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1929 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
1930 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1931 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1932 ; AVX512F-NEXT: retq
1934 ; AVX512BW-LABEL: ugt_6_v32i16:
1935 ; AVX512BW: # %bb.0:
1936 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1937 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1938 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1939 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1940 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1941 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1942 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1943 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1944 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1945 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1946 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1947 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1948 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1949 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1950 ; AVX512BW-NEXT: retq
1952 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_6_v32i16:
1953 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1954 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1955 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1956 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1957 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1958 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1959 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1960 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1961 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1962 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
1963 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1964 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1965 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1967 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_6_v32i16:
1968 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1969 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1970 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1971 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1972 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1973 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1974 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1975 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1976 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1977 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1978 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1979 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1980 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1981 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1982 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1983 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1985 ; BITALG-LABEL: ugt_6_v32i16:
1987 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1988 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1989 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1991 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1992 %3 = icmp ugt <32 x i16> %2, <i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6>
1993 %4 = sext <32 x i1> %3 to <32 x i16>
1997 define <32 x i16> @ult_7_v32i16(<32 x i16> %0) {
1998 ; AVX512F-LABEL: ult_7_v32i16:
2000 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2001 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2002 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2003 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2004 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2005 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2006 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2007 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2008 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2009 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2010 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2011 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2012 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2013 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2014 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2015 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2016 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2017 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2018 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2019 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2020 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2021 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2022 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
2023 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2024 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2025 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2026 ; AVX512F-NEXT: retq
2028 ; AVX512BW-LABEL: ult_7_v32i16:
2029 ; AVX512BW: # %bb.0:
2030 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2031 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2032 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2033 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2034 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2035 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2036 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2037 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2038 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2039 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2040 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2041 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2042 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2043 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2044 ; AVX512BW-NEXT: retq
2046 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_7_v32i16:
2047 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2048 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2049 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2050 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2051 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2052 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2053 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2054 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2055 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
2056 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2057 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2058 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2059 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2061 ; AVX512VPOPCNTDQ-BW-LABEL: ult_7_v32i16:
2062 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2063 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2064 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2065 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2066 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2067 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2068 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2069 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2070 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2071 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2072 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2073 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2074 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2075 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2076 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2077 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2079 ; BITALG-LABEL: ult_7_v32i16:
2081 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2082 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2083 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2085 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2086 %3 = icmp ult <32 x i16> %2, <i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7>
2087 %4 = sext <32 x i1> %3 to <32 x i16>
2091 define <32 x i16> @ugt_7_v32i16(<32 x i16> %0) {
2092 ; AVX512F-LABEL: ugt_7_v32i16:
2094 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2095 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2096 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2097 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2098 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2099 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2100 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2101 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2102 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2103 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2104 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2105 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2106 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2107 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2108 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2109 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2110 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2111 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2112 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2113 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2114 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2115 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2116 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
2117 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2118 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2119 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2120 ; AVX512F-NEXT: retq
2122 ; AVX512BW-LABEL: ugt_7_v32i16:
2123 ; AVX512BW: # %bb.0:
2124 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2125 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2126 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2127 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2128 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2129 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2130 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2131 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2132 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2133 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2134 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2135 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2136 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2137 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2138 ; AVX512BW-NEXT: retq
2140 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_7_v32i16:
2141 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2142 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2143 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2144 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2145 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2146 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2147 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2148 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2149 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
2150 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
2151 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2152 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2153 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2155 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_7_v32i16:
2156 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2157 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2158 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2159 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2160 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2161 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2162 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2163 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2164 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2165 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2166 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2167 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2168 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2169 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2170 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2171 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2173 ; BITALG-LABEL: ugt_7_v32i16:
2175 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2176 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2177 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2179 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2180 %3 = icmp ugt <32 x i16> %2, <i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7>
2181 %4 = sext <32 x i1> %3 to <32 x i16>
2185 define <32 x i16> @ult_8_v32i16(<32 x i16> %0) {
2186 ; AVX512F-LABEL: ult_8_v32i16:
2188 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2189 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2190 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2191 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2192 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2193 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2194 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2195 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2196 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2197 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2198 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2199 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2200 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2201 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2202 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2203 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2204 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2205 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2206 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2207 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2208 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2209 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2210 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2211 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2212 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2213 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2214 ; AVX512F-NEXT: retq
2216 ; AVX512BW-LABEL: ult_8_v32i16:
2217 ; AVX512BW: # %bb.0:
2218 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2219 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2220 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2221 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2222 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2223 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2224 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2225 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2226 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2227 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2228 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2229 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2230 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2231 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2232 ; AVX512BW-NEXT: retq
2234 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_8_v32i16:
2235 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2236 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2237 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2238 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2239 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2240 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2241 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2242 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2243 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2244 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2245 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2246 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2247 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2249 ; AVX512VPOPCNTDQ-BW-LABEL: ult_8_v32i16:
2250 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2251 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2252 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2253 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2254 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2255 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2256 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2257 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2258 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2259 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2260 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2261 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2262 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2263 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2264 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2265 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2267 ; BITALG-LABEL: ult_8_v32i16:
2269 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2270 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2271 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2273 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2274 %3 = icmp ult <32 x i16> %2, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
2275 %4 = sext <32 x i1> %3 to <32 x i16>
2279 define <32 x i16> @ugt_8_v32i16(<32 x i16> %0) {
2280 ; AVX512F-LABEL: ugt_8_v32i16:
2282 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2283 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2284 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2285 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2286 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2287 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2288 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2289 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2290 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2291 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2292 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2293 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2294 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2295 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2296 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2297 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2298 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2299 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2300 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2301 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2302 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2303 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2304 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2305 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2306 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2307 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2308 ; AVX512F-NEXT: retq
2310 ; AVX512BW-LABEL: ugt_8_v32i16:
2311 ; AVX512BW: # %bb.0:
2312 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2313 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2314 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2315 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2316 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2317 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2318 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2319 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2320 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2321 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2322 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2323 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2324 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2325 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2326 ; AVX512BW-NEXT: retq
2328 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_8_v32i16:
2329 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2330 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2331 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2332 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2333 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2334 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2335 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2336 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2337 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2338 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
2339 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2340 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2341 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2343 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_8_v32i16:
2344 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2345 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2346 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2347 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2348 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2349 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2350 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2351 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2352 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2353 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2354 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2355 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2356 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2357 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2358 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2359 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2361 ; BITALG-LABEL: ugt_8_v32i16:
2363 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2364 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2365 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2367 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2368 %3 = icmp ugt <32 x i16> %2, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
2369 %4 = sext <32 x i1> %3 to <32 x i16>
2373 define <32 x i16> @ult_9_v32i16(<32 x i16> %0) {
2374 ; AVX512F-LABEL: ult_9_v32i16:
2376 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2377 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2378 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2379 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2380 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2381 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2382 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2383 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2384 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2385 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2386 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2387 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2388 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2389 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2390 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2391 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2392 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2393 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2394 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2395 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2396 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2397 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2398 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2399 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2400 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2401 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2402 ; AVX512F-NEXT: retq
2404 ; AVX512BW-LABEL: ult_9_v32i16:
2405 ; AVX512BW: # %bb.0:
2406 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2407 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2408 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2409 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2410 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2411 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2412 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2413 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2414 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2415 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2416 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2417 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2418 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2419 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2420 ; AVX512BW-NEXT: retq
2422 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_9_v32i16:
2423 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2424 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2425 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2426 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2427 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2428 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2429 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2430 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2431 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2432 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2433 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2434 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2435 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2437 ; AVX512VPOPCNTDQ-BW-LABEL: ult_9_v32i16:
2438 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2439 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2440 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2441 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2442 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2443 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2444 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2445 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2446 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2447 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2448 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2449 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2450 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2451 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2452 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2453 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2455 ; BITALG-LABEL: ult_9_v32i16:
2457 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2458 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2459 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2461 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2462 %3 = icmp ult <32 x i16> %2, <i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9>
2463 %4 = sext <32 x i1> %3 to <32 x i16>
2467 define <32 x i16> @ugt_9_v32i16(<32 x i16> %0) {
2468 ; AVX512F-LABEL: ugt_9_v32i16:
2470 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2471 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2472 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2473 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2474 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2475 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2476 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2477 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2478 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2479 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2480 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2481 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2482 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2483 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2484 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2485 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2486 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2487 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2488 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2489 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2490 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2491 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2492 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2493 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2494 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2495 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2496 ; AVX512F-NEXT: retq
2498 ; AVX512BW-LABEL: ugt_9_v32i16:
2499 ; AVX512BW: # %bb.0:
2500 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2501 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2502 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2503 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2504 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2505 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2506 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2507 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2508 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2509 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2510 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2511 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2512 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2513 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2514 ; AVX512BW-NEXT: retq
2516 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_9_v32i16:
2517 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2518 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2519 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2520 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2521 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2522 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2523 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2524 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2525 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2526 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
2527 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2528 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2529 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2531 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_9_v32i16:
2532 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2533 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2534 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2535 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2536 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2537 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2538 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2539 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2540 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2541 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2542 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2543 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2544 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2545 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2546 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2547 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2549 ; BITALG-LABEL: ugt_9_v32i16:
2551 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2552 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2553 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2555 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2556 %3 = icmp ugt <32 x i16> %2, <i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9>
2557 %4 = sext <32 x i1> %3 to <32 x i16>
2561 define <32 x i16> @ult_10_v32i16(<32 x i16> %0) {
2562 ; AVX512F-LABEL: ult_10_v32i16:
2564 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2565 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2566 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2567 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2568 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2569 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2570 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2571 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2572 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2573 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2574 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2575 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2576 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2577 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2578 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2579 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2580 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2581 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2582 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2583 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2584 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2585 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2586 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2587 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2588 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2589 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2590 ; AVX512F-NEXT: retq
2592 ; AVX512BW-LABEL: ult_10_v32i16:
2593 ; AVX512BW: # %bb.0:
2594 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2595 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2596 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2597 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2598 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2599 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2600 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2601 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2602 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2603 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2604 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2605 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2606 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2607 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2608 ; AVX512BW-NEXT: retq
2610 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_10_v32i16:
2611 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2612 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2613 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2614 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2615 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2616 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2617 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2618 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2619 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2620 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2621 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2622 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2623 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2625 ; AVX512VPOPCNTDQ-BW-LABEL: ult_10_v32i16:
2626 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2627 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2628 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2629 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2630 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2631 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2632 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2633 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2634 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2635 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2636 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2637 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2638 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2639 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2640 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2641 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2643 ; BITALG-LABEL: ult_10_v32i16:
2645 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2646 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2647 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2649 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2650 %3 = icmp ult <32 x i16> %2, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
2651 %4 = sext <32 x i1> %3 to <32 x i16>
2655 define <32 x i16> @ugt_10_v32i16(<32 x i16> %0) {
2656 ; AVX512F-LABEL: ugt_10_v32i16:
2658 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2659 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2660 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2661 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2662 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2663 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2664 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2665 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2666 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2667 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2668 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2669 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2670 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2671 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2672 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2673 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2674 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2675 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2676 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2677 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2678 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2679 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2680 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2681 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2682 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2683 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2684 ; AVX512F-NEXT: retq
2686 ; AVX512BW-LABEL: ugt_10_v32i16:
2687 ; AVX512BW: # %bb.0:
2688 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2689 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2690 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2691 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2692 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2693 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2694 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2695 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2696 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2697 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2698 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2699 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2700 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2701 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2702 ; AVX512BW-NEXT: retq
2704 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_10_v32i16:
2705 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2706 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2707 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2708 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2709 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2710 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2711 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2712 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2713 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2714 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
2715 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2716 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2717 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2719 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_10_v32i16:
2720 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2721 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2722 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2723 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2724 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2725 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2726 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2727 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2728 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2729 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2730 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2731 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2732 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2733 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2734 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2735 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2737 ; BITALG-LABEL: ugt_10_v32i16:
2739 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2740 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2741 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2743 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2744 %3 = icmp ugt <32 x i16> %2, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
2745 %4 = sext <32 x i1> %3 to <32 x i16>
2749 define <32 x i16> @ult_11_v32i16(<32 x i16> %0) {
2750 ; AVX512F-LABEL: ult_11_v32i16:
2752 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2753 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2754 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2755 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2756 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2757 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2758 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2759 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2760 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2761 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2762 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2763 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2764 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2765 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2766 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2767 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2768 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2769 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2770 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2771 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2772 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2773 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2774 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2775 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2776 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2777 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2778 ; AVX512F-NEXT: retq
2780 ; AVX512BW-LABEL: ult_11_v32i16:
2781 ; AVX512BW: # %bb.0:
2782 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2783 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2784 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2785 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2786 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2787 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2788 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2789 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2790 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2791 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2792 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2793 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2794 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2795 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2796 ; AVX512BW-NEXT: retq
2798 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_11_v32i16:
2799 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2800 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2801 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2802 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2803 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2804 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2805 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2806 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2807 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2808 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2809 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2810 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2811 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2813 ; AVX512VPOPCNTDQ-BW-LABEL: ult_11_v32i16:
2814 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2815 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2816 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2817 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2818 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2819 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2820 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2821 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2822 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2823 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2824 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2825 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2826 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2827 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2828 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2829 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2831 ; BITALG-LABEL: ult_11_v32i16:
2833 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2834 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2835 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2837 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2838 %3 = icmp ult <32 x i16> %2, <i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11>
2839 %4 = sext <32 x i1> %3 to <32 x i16>
2843 define <32 x i16> @ugt_11_v32i16(<32 x i16> %0) {
2844 ; AVX512F-LABEL: ugt_11_v32i16:
2846 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2847 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2848 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2849 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2850 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2851 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2852 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2853 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2854 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2855 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2856 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2857 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2858 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2859 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2860 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2861 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2862 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2863 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2864 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2865 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2866 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2867 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2868 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2869 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2870 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2871 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2872 ; AVX512F-NEXT: retq
2874 ; AVX512BW-LABEL: ugt_11_v32i16:
2875 ; AVX512BW: # %bb.0:
2876 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2877 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2878 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2879 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2880 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2881 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2882 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2883 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2884 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2885 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2886 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2887 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2888 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2889 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2890 ; AVX512BW-NEXT: retq
2892 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_11_v32i16:
2893 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2894 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2895 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2896 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2897 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2898 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2899 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2900 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2901 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2902 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
2903 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2904 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2905 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2907 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_11_v32i16:
2908 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2909 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2910 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2911 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2912 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2913 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2914 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2915 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2916 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2917 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2918 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2919 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2920 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2921 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2922 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2923 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2925 ; BITALG-LABEL: ugt_11_v32i16:
2927 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2928 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2929 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2931 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2932 %3 = icmp ugt <32 x i16> %2, <i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11>
2933 %4 = sext <32 x i1> %3 to <32 x i16>
2937 define <32 x i16> @ult_12_v32i16(<32 x i16> %0) {
2938 ; AVX512F-LABEL: ult_12_v32i16:
2940 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2941 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2942 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2943 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
2944 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2945 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2946 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2947 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2948 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2949 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2950 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2951 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2952 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2953 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2954 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2955 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2956 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2957 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2958 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2959 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2960 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2961 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2962 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
2963 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2964 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2965 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2966 ; AVX512F-NEXT: retq
2968 ; AVX512BW-LABEL: ult_12_v32i16:
2969 ; AVX512BW: # %bb.0:
2970 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2971 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2972 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2973 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
2974 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2975 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2976 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2977 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2978 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2979 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2980 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2981 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2982 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2983 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2984 ; AVX512BW-NEXT: retq
2986 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_12_v32i16:
2987 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2988 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2989 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2990 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2991 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2992 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2993 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2994 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2995 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
2996 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2997 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2998 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2999 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3001 ; AVX512VPOPCNTDQ-BW-LABEL: ult_12_v32i16:
3002 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3003 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3004 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3005 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3006 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3007 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3008 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3009 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3010 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3011 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3012 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3013 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3014 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3015 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3016 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3017 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3019 ; BITALG-LABEL: ult_12_v32i16:
3021 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3022 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3023 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3025 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3026 %3 = icmp ult <32 x i16> %2, <i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12>
3027 %4 = sext <32 x i1> %3 to <32 x i16>
3031 define <32 x i16> @ugt_12_v32i16(<32 x i16> %0) {
3032 ; AVX512F-LABEL: ugt_12_v32i16:
3034 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3035 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3036 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3037 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
3038 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3039 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3040 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3041 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3042 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3043 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3044 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3045 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3046 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3047 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3048 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3049 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3050 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3051 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3052 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3053 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3054 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3055 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3056 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
3057 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
3058 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3059 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3060 ; AVX512F-NEXT: retq
3062 ; AVX512BW-LABEL: ugt_12_v32i16:
3063 ; AVX512BW: # %bb.0:
3064 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3065 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3066 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3067 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3068 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3069 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3070 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3071 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3072 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3073 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3074 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3075 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3076 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3077 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3078 ; AVX512BW-NEXT: retq
3080 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_12_v32i16:
3081 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3082 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3083 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3084 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3085 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3086 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3087 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3088 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3089 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
3090 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
3091 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3092 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3093 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3095 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_12_v32i16:
3096 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3097 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3098 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3099 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3100 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3101 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3102 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3103 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3104 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3105 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3106 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3107 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3108 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3109 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3110 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3111 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3113 ; BITALG-LABEL: ugt_12_v32i16:
3115 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3116 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3117 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3119 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3120 %3 = icmp ugt <32 x i16> %2, <i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12>
3121 %4 = sext <32 x i1> %3 to <32 x i16>
3125 define <32 x i16> @ult_13_v32i16(<32 x i16> %0) {
3126 ; AVX512F-LABEL: ult_13_v32i16:
3128 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3129 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3130 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3131 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
3132 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3133 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3134 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3135 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3136 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3137 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3138 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3139 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3140 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3141 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3142 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3143 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3144 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3145 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3146 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3147 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3148 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3149 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3150 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
3151 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3152 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3153 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3154 ; AVX512F-NEXT: retq
3156 ; AVX512BW-LABEL: ult_13_v32i16:
3157 ; AVX512BW: # %bb.0:
3158 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3159 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3160 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3161 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3162 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3163 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3164 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3165 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3166 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3167 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3168 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3169 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3170 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3171 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3172 ; AVX512BW-NEXT: retq
3174 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_13_v32i16:
3175 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3176 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3177 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3178 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3179 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3180 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3181 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3182 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3183 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
3184 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
3185 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3186 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3187 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3189 ; AVX512VPOPCNTDQ-BW-LABEL: ult_13_v32i16:
3190 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3191 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3192 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3193 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3194 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3195 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3196 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3197 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3198 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3199 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3200 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3201 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3202 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3203 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3204 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3205 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3207 ; BITALG-LABEL: ult_13_v32i16:
3209 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3210 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3211 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3213 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3214 %3 = icmp ult <32 x i16> %2, <i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13>
3215 %4 = sext <32 x i1> %3 to <32 x i16>
3219 define <32 x i16> @ugt_13_v32i16(<32 x i16> %0) {
3220 ; AVX512F-LABEL: ugt_13_v32i16:
3222 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3223 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3224 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3225 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
3226 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3227 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3228 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3229 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3230 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3231 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3232 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3233 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3234 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3235 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3236 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3237 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3238 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3239 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3240 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3241 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3242 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3243 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3244 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
3245 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
3246 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3247 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3248 ; AVX512F-NEXT: retq
3250 ; AVX512BW-LABEL: ugt_13_v32i16:
3251 ; AVX512BW: # %bb.0:
3252 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3253 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3254 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3255 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3256 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3257 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3258 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3259 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3260 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3261 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3262 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3263 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3264 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3265 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3266 ; AVX512BW-NEXT: retq
3268 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_13_v32i16:
3269 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3270 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3271 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3272 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3273 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3274 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3275 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3276 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3277 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
3278 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
3279 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3280 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3281 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3283 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_13_v32i16:
3284 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3285 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3286 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3287 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3288 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3289 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3290 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3291 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3292 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3293 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3294 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3295 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3296 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3297 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3298 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3299 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3301 ; BITALG-LABEL: ugt_13_v32i16:
3303 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3304 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3305 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3307 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3308 %3 = icmp ugt <32 x i16> %2, <i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13>
3309 %4 = sext <32 x i1> %3 to <32 x i16>
3313 define <32 x i16> @ult_14_v32i16(<32 x i16> %0) {
3314 ; AVX512F-LABEL: ult_14_v32i16:
3316 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3317 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3318 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3319 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
3320 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3321 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3322 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3323 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3324 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3325 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3326 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3327 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3328 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3329 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3330 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3331 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3332 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3333 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3334 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3335 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3336 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3337 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3338 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3339 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3340 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3341 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3342 ; AVX512F-NEXT: retq
3344 ; AVX512BW-LABEL: ult_14_v32i16:
3345 ; AVX512BW: # %bb.0:
3346 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3347 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3348 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3349 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3350 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3351 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3352 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3353 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3354 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3355 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3356 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3357 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3358 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3359 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3360 ; AVX512BW-NEXT: retq
3362 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_14_v32i16:
3363 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3364 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3365 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3366 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3367 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3368 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3369 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3370 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3371 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3372 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
3373 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3374 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3375 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3377 ; AVX512VPOPCNTDQ-BW-LABEL: ult_14_v32i16:
3378 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3379 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3380 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3381 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3382 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3383 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3384 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3385 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3386 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3387 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3388 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3389 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3390 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3391 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3392 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3393 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3395 ; BITALG-LABEL: ult_14_v32i16:
3397 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3398 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3399 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3401 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3402 %3 = icmp ult <32 x i16> %2, <i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14>
3403 %4 = sext <32 x i1> %3 to <32 x i16>
3407 define <32 x i16> @ugt_14_v32i16(<32 x i16> %0) {
3408 ; AVX512F-LABEL: ugt_14_v32i16:
3410 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3411 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3412 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3413 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
3414 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3415 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3416 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3417 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3418 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3419 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3420 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3421 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3422 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3423 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3424 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3425 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3426 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3427 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3428 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3429 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3430 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3431 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3432 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3433 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
3434 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3435 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3436 ; AVX512F-NEXT: retq
3438 ; AVX512BW-LABEL: ugt_14_v32i16:
3439 ; AVX512BW: # %bb.0:
3440 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3441 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3442 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3443 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3444 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3445 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3446 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3447 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3448 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3449 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3450 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3451 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3452 ; AVX512BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3453 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3454 ; AVX512BW-NEXT: retq
3456 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_14_v32i16:
3457 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3458 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3459 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3460 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3461 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3462 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3463 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3464 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3465 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3466 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
3467 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3468 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3469 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3471 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_14_v32i16:
3472 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3473 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3474 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3475 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3476 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3477 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3478 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3479 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3480 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3481 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3482 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3483 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3484 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3485 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3486 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3487 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3489 ; BITALG-LABEL: ugt_14_v32i16:
3491 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3492 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3493 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3495 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3496 %3 = icmp ugt <32 x i16> %2, <i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14>
3497 %4 = sext <32 x i1> %3 to <32 x i16>
3501 define <32 x i16> @ult_15_v32i16(<32 x i16> %0) {
3502 ; AVX512F-LABEL: ult_15_v32i16:
3504 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3505 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3506 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3507 ; AVX512F-NEXT: # ymm3 = mem[0,1,0,1]
3508 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3509 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3510 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3511 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3512 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3513 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3514 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3515 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3516 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3517 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3518 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3519 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3520 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3521 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3522 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3523 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3524 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3525 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3526 ; AVX512F-NEXT: vpbroadcastw {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3527 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3528 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3529 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3530 ; AVX512F-NEXT: retq
3532 ; AVX512BW-LABEL: ult_15_v32i16:
3533 ; AVX512BW: # %bb.0:
3534 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3535 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3536 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3537 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3538 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3539 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3540 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3541 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3542 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3543 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3544 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3545 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3546 ; AVX512BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3547 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3548 ; AVX512BW-NEXT: retq
3550 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_15_v32i16:
3551 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3552 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3553 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3554 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3555 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3556 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3557 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3558 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3559 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpbroadcastw {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3560 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
3561 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3562 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3563 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3565 ; AVX512VPOPCNTDQ-BW-LABEL: ult_15_v32i16:
3566 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3567 ; AVX512VPOPCNTDQ-BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3568 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3569 ; AVX512VPOPCNTDQ-BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3570 ; AVX512VPOPCNTDQ-BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3571 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3572 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3573 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3574 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3575 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3576 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3577 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3578 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3579 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3580 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3581 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3583 ; BITALG-LABEL: ult_15_v32i16:
3585 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3586 ; BITALG-NEXT: vpcmpltw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3587 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3589 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3590 %3 = icmp ult <32 x i16> %2, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
3591 %4 = sext <32 x i1> %3 to <32 x i16>
3595 define <16 x i32> @ugt_1_v16i32(<16 x i32> %0) {
3596 ; AVX512F-LABEL: ugt_1_v16i32:
3598 ; AVX512F-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3599 ; AVX512F-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3600 ; AVX512F-NEXT: vptestmd %zmm1, %zmm0, %k1
3601 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3602 ; AVX512F-NEXT: retq
3604 ; AVX512BW-LABEL: ugt_1_v16i32:
3605 ; AVX512BW: # %bb.0:
3606 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3607 ; AVX512BW-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3608 ; AVX512BW-NEXT: vptestmd %zmm1, %zmm0, %k1
3609 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3610 ; AVX512BW-NEXT: retq
3612 ; AVX512VPOPCNTDQ-LABEL: ugt_1_v16i32:
3613 ; AVX512VPOPCNTDQ: # %bb.0:
3614 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3615 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3616 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3617 ; AVX512VPOPCNTDQ-NEXT: retq
3619 ; BITALG-LABEL: ugt_1_v16i32:
3621 ; BITALG-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3622 ; BITALG-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3623 ; BITALG-NEXT: vptestmd %zmm1, %zmm0, %k1
3624 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3626 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3627 %3 = icmp ugt <16 x i32> %2, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
3628 %4 = sext <16 x i1> %3 to <16 x i32>
3632 define <16 x i32> @ult_2_v16i32(<16 x i32> %0) {
3633 ; AVX512F-LABEL: ult_2_v16i32:
3635 ; AVX512F-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3636 ; AVX512F-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3637 ; AVX512F-NEXT: vptestnmd %zmm1, %zmm0, %k1
3638 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3639 ; AVX512F-NEXT: retq
3641 ; AVX512BW-LABEL: ult_2_v16i32:
3642 ; AVX512BW: # %bb.0:
3643 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3644 ; AVX512BW-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3645 ; AVX512BW-NEXT: vptestnmd %zmm1, %zmm0, %k1
3646 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3647 ; AVX512BW-NEXT: retq
3649 ; AVX512VPOPCNTDQ-LABEL: ult_2_v16i32:
3650 ; AVX512VPOPCNTDQ: # %bb.0:
3651 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3652 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3653 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3654 ; AVX512VPOPCNTDQ-NEXT: retq
3656 ; BITALG-LABEL: ult_2_v16i32:
3658 ; BITALG-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3659 ; BITALG-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3660 ; BITALG-NEXT: vptestnmd %zmm1, %zmm0, %k1
3661 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3663 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3664 %3 = icmp ult <16 x i32> %2, <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>
3665 %4 = sext <16 x i1> %3 to <16 x i32>
3669 define <16 x i32> @ugt_2_v16i32(<16 x i32> %0) {
3670 ; AVX512F-LABEL: ugt_2_v16i32:
3672 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3673 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3674 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3675 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3676 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
3677 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
3678 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
3679 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
3680 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
3681 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
3682 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
3683 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
3684 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
3685 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
3686 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
3687 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
3688 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
3689 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
3690 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3691 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
3692 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
3693 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
3694 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
3695 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
3696 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
3697 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
3698 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3699 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
3700 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3701 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3702 ; AVX512F-NEXT: retq
3704 ; AVX512BW-LABEL: ugt_2_v16i32:
3705 ; AVX512BW: # %bb.0:
3706 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3707 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3708 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3709 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3710 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3711 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3712 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3713 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3714 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3715 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
3716 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3717 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3718 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3719 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3720 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3721 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3722 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3723 ; AVX512BW-NEXT: retq
3725 ; AVX512VPOPCNTDQ-LABEL: ugt_2_v16i32:
3726 ; AVX512VPOPCNTDQ: # %bb.0:
3727 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3728 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3729 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3730 ; AVX512VPOPCNTDQ-NEXT: retq
3732 ; BITALG-LABEL: ugt_2_v16i32:
3734 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
3735 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3736 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3737 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3738 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3739 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3740 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3741 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3742 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3744 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3745 %3 = icmp ugt <16 x i32> %2, <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>
3746 %4 = sext <16 x i1> %3 to <16 x i32>
3750 define <16 x i32> @ult_3_v16i32(<16 x i32> %0) {
3751 ; AVX512F-LABEL: ult_3_v16i32:
3753 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3754 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3755 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3756 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3757 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
3758 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
3759 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
3760 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
3761 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
3762 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
3763 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
3764 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
3765 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
3766 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
3767 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
3768 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
3769 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
3770 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
3771 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3772 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
3773 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
3774 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
3775 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
3776 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
3777 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
3778 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
3779 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3780 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
3781 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3782 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3783 ; AVX512F-NEXT: retq
3785 ; AVX512BW-LABEL: ult_3_v16i32:
3786 ; AVX512BW: # %bb.0:
3787 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3788 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3789 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3790 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3791 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3792 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3793 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3794 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3795 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3796 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
3797 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3798 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3799 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3800 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3801 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3802 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3803 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3804 ; AVX512BW-NEXT: retq
3806 ; AVX512VPOPCNTDQ-LABEL: ult_3_v16i32:
3807 ; AVX512VPOPCNTDQ: # %bb.0:
3808 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3809 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3810 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3811 ; AVX512VPOPCNTDQ-NEXT: retq
3813 ; BITALG-LABEL: ult_3_v16i32:
3815 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
3816 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3817 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3818 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3819 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3820 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3821 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3822 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3823 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3825 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3826 %3 = icmp ult <16 x i32> %2, <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
3827 %4 = sext <16 x i1> %3 to <16 x i32>
3831 define <16 x i32> @ugt_3_v16i32(<16 x i32> %0) {
3832 ; AVX512F-LABEL: ugt_3_v16i32:
3834 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3835 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3836 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3837 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3838 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
3839 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
3840 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
3841 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
3842 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
3843 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
3844 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
3845 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
3846 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
3847 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
3848 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
3849 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
3850 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
3851 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
3852 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3853 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
3854 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
3855 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
3856 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
3857 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
3858 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
3859 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
3860 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3861 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
3862 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3863 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3864 ; AVX512F-NEXT: retq
3866 ; AVX512BW-LABEL: ugt_3_v16i32:
3867 ; AVX512BW: # %bb.0:
3868 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3869 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3870 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3871 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3872 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3873 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3874 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3875 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3876 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3877 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
3878 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3879 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3880 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3881 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3882 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3883 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3884 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3885 ; AVX512BW-NEXT: retq
3887 ; AVX512VPOPCNTDQ-LABEL: ugt_3_v16i32:
3888 ; AVX512VPOPCNTDQ: # %bb.0:
3889 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3890 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3891 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3892 ; AVX512VPOPCNTDQ-NEXT: retq
3894 ; BITALG-LABEL: ugt_3_v16i32:
3896 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
3897 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3898 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3899 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3900 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3901 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3902 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3903 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3904 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3906 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3907 %3 = icmp ugt <16 x i32> %2, <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
3908 %4 = sext <16 x i1> %3 to <16 x i32>
3912 define <16 x i32> @ult_4_v16i32(<16 x i32> %0) {
3913 ; AVX512F-LABEL: ult_4_v16i32:
3915 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3916 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3917 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3918 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3919 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
3920 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
3921 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
3922 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
3923 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
3924 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
3925 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
3926 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
3927 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
3928 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
3929 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
3930 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
3931 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
3932 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
3933 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3934 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
3935 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
3936 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
3937 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
3938 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
3939 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
3940 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
3941 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3942 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
3943 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3944 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3945 ; AVX512F-NEXT: retq
3947 ; AVX512BW-LABEL: ult_4_v16i32:
3948 ; AVX512BW: # %bb.0:
3949 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3950 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3951 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3952 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
3953 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3954 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3955 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3956 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3957 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3958 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
3959 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3960 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3961 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3962 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3963 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3964 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3965 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3966 ; AVX512BW-NEXT: retq
3968 ; AVX512VPOPCNTDQ-LABEL: ult_4_v16i32:
3969 ; AVX512VPOPCNTDQ: # %bb.0:
3970 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3971 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3972 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3973 ; AVX512VPOPCNTDQ-NEXT: retq
3975 ; BITALG-LABEL: ult_4_v16i32:
3977 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
3978 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3979 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3980 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3981 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3982 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3983 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3984 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3985 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3987 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3988 %3 = icmp ult <16 x i32> %2, <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
3989 %4 = sext <16 x i1> %3 to <16 x i32>
3993 define <16 x i32> @ugt_4_v16i32(<16 x i32> %0) {
3994 ; AVX512F-LABEL: ugt_4_v16i32:
3996 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3997 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3998 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3999 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4000 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4001 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4002 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4003 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4004 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4005 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4006 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4007 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4008 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4009 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4010 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4011 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4012 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4013 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4014 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4015 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4016 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4017 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4018 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4019 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4020 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4021 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4022 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4023 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4024 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4025 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4026 ; AVX512F-NEXT: retq
4028 ; AVX512BW-LABEL: ugt_4_v16i32:
4029 ; AVX512BW: # %bb.0:
4030 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4031 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4032 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4033 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4034 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4035 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4036 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4037 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4038 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4039 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4040 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4041 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4042 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4043 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4044 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4045 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4046 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4047 ; AVX512BW-NEXT: retq
4049 ; AVX512VPOPCNTDQ-LABEL: ugt_4_v16i32:
4050 ; AVX512VPOPCNTDQ: # %bb.0:
4051 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4052 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4053 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4054 ; AVX512VPOPCNTDQ-NEXT: retq
4056 ; BITALG-LABEL: ugt_4_v16i32:
4058 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4059 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4060 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4061 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4062 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4063 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4064 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4065 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4066 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4068 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4069 %3 = icmp ugt <16 x i32> %2, <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
4070 %4 = sext <16 x i1> %3 to <16 x i32>
4074 define <16 x i32> @ult_5_v16i32(<16 x i32> %0) {
4075 ; AVX512F-LABEL: ult_5_v16i32:
4077 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4078 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4079 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4080 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4081 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4082 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4083 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4084 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4085 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4086 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4087 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4088 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4089 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4090 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4091 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4092 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4093 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4094 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4095 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4096 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4097 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4098 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4099 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4100 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4101 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4102 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4103 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4104 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4105 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4106 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4107 ; AVX512F-NEXT: retq
4109 ; AVX512BW-LABEL: ult_5_v16i32:
4110 ; AVX512BW: # %bb.0:
4111 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4112 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4113 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4114 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4115 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4116 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4117 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4118 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4119 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4120 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4121 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4122 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4123 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4124 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4125 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4126 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4127 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4128 ; AVX512BW-NEXT: retq
4130 ; AVX512VPOPCNTDQ-LABEL: ult_5_v16i32:
4131 ; AVX512VPOPCNTDQ: # %bb.0:
4132 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4133 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4134 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4135 ; AVX512VPOPCNTDQ-NEXT: retq
4137 ; BITALG-LABEL: ult_5_v16i32:
4139 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4140 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4141 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4142 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4143 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4144 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4145 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4146 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4147 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4149 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4150 %3 = icmp ult <16 x i32> %2, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
4151 %4 = sext <16 x i1> %3 to <16 x i32>
4155 define <16 x i32> @ugt_5_v16i32(<16 x i32> %0) {
4156 ; AVX512F-LABEL: ugt_5_v16i32:
4158 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4159 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4160 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4161 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4162 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4163 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4164 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4165 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4166 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4167 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4168 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4169 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4170 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4171 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4172 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4173 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4174 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4175 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4176 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4177 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4178 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4179 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4180 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4181 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4182 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4183 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4184 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4185 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4186 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4187 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4188 ; AVX512F-NEXT: retq
4190 ; AVX512BW-LABEL: ugt_5_v16i32:
4191 ; AVX512BW: # %bb.0:
4192 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4193 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4194 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4195 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4196 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4197 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4198 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4199 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4200 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4201 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4202 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4203 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4204 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4205 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4206 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4207 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4208 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4209 ; AVX512BW-NEXT: retq
4211 ; AVX512VPOPCNTDQ-LABEL: ugt_5_v16i32:
4212 ; AVX512VPOPCNTDQ: # %bb.0:
4213 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4214 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4215 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4216 ; AVX512VPOPCNTDQ-NEXT: retq
4218 ; BITALG-LABEL: ugt_5_v16i32:
4220 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4221 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4222 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4223 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4224 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4225 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4226 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4227 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4228 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4230 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4231 %3 = icmp ugt <16 x i32> %2, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
4232 %4 = sext <16 x i1> %3 to <16 x i32>
4236 define <16 x i32> @ult_6_v16i32(<16 x i32> %0) {
4237 ; AVX512F-LABEL: ult_6_v16i32:
4239 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4240 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4241 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4242 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4243 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4244 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4245 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4246 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4247 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4248 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4249 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4250 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4251 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4252 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4253 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4254 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4255 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4256 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4257 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4258 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4259 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4260 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4261 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4262 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4263 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4264 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4265 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4266 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4267 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4268 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4269 ; AVX512F-NEXT: retq
4271 ; AVX512BW-LABEL: ult_6_v16i32:
4272 ; AVX512BW: # %bb.0:
4273 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4274 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4275 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4276 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4277 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4278 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4279 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4280 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4281 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4282 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4283 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4284 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4285 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4286 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4287 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4288 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4289 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4290 ; AVX512BW-NEXT: retq
4292 ; AVX512VPOPCNTDQ-LABEL: ult_6_v16i32:
4293 ; AVX512VPOPCNTDQ: # %bb.0:
4294 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4295 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4296 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4297 ; AVX512VPOPCNTDQ-NEXT: retq
4299 ; BITALG-LABEL: ult_6_v16i32:
4301 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4302 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4303 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4304 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4305 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4306 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4307 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4308 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4309 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4311 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4312 %3 = icmp ult <16 x i32> %2, <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6>
4313 %4 = sext <16 x i1> %3 to <16 x i32>
4317 define <16 x i32> @ugt_6_v16i32(<16 x i32> %0) {
4318 ; AVX512F-LABEL: ugt_6_v16i32:
4320 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4321 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4322 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4323 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4324 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4325 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4326 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4327 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4328 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4329 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4330 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4331 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4332 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4333 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4334 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4335 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4336 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4337 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4338 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4339 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4340 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4341 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4342 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4343 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4344 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4345 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4346 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4347 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4348 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4349 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4350 ; AVX512F-NEXT: retq
4352 ; AVX512BW-LABEL: ugt_6_v16i32:
4353 ; AVX512BW: # %bb.0:
4354 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4355 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4356 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4357 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4358 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4359 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4360 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4361 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4362 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4363 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4364 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4365 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4366 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4367 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4368 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4369 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4370 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4371 ; AVX512BW-NEXT: retq
4373 ; AVX512VPOPCNTDQ-LABEL: ugt_6_v16i32:
4374 ; AVX512VPOPCNTDQ: # %bb.0:
4375 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4376 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4377 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4378 ; AVX512VPOPCNTDQ-NEXT: retq
4380 ; BITALG-LABEL: ugt_6_v16i32:
4382 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4383 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4384 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4385 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4386 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4387 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4388 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4389 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4390 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4392 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4393 %3 = icmp ugt <16 x i32> %2, <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6>
4394 %4 = sext <16 x i1> %3 to <16 x i32>
4398 define <16 x i32> @ult_7_v16i32(<16 x i32> %0) {
4399 ; AVX512F-LABEL: ult_7_v16i32:
4401 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4402 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4403 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4404 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4405 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4406 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4407 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4408 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4409 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4410 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4411 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4412 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4413 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4414 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4415 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4416 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4417 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4418 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4419 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4420 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4421 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4422 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4423 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4424 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4425 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4426 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4427 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4428 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4429 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4430 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4431 ; AVX512F-NEXT: retq
4433 ; AVX512BW-LABEL: ult_7_v16i32:
4434 ; AVX512BW: # %bb.0:
4435 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4436 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4437 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4438 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4439 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4440 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4441 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4442 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4443 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4444 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4445 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4446 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4447 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4448 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4449 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4450 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4451 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4452 ; AVX512BW-NEXT: retq
4454 ; AVX512VPOPCNTDQ-LABEL: ult_7_v16i32:
4455 ; AVX512VPOPCNTDQ: # %bb.0:
4456 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4457 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4458 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4459 ; AVX512VPOPCNTDQ-NEXT: retq
4461 ; BITALG-LABEL: ult_7_v16i32:
4463 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4464 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4465 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4466 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4467 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4468 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4469 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4470 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4471 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4473 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4474 %3 = icmp ult <16 x i32> %2, <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7>
4475 %4 = sext <16 x i1> %3 to <16 x i32>
4479 define <16 x i32> @ugt_7_v16i32(<16 x i32> %0) {
4480 ; AVX512F-LABEL: ugt_7_v16i32:
4482 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4483 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4484 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4485 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4486 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4487 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4488 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4489 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4490 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4491 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4492 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4493 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4494 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4495 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4496 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4497 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4498 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4499 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4500 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4501 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4502 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4503 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4504 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4505 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4506 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4507 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4508 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4509 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4510 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4511 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4512 ; AVX512F-NEXT: retq
4514 ; AVX512BW-LABEL: ugt_7_v16i32:
4515 ; AVX512BW: # %bb.0:
4516 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4517 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4518 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4519 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4520 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4521 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4522 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4523 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4524 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4525 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4526 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4527 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4528 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4529 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4530 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4531 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4532 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4533 ; AVX512BW-NEXT: retq
4535 ; AVX512VPOPCNTDQ-LABEL: ugt_7_v16i32:
4536 ; AVX512VPOPCNTDQ: # %bb.0:
4537 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4538 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4539 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4540 ; AVX512VPOPCNTDQ-NEXT: retq
4542 ; BITALG-LABEL: ugt_7_v16i32:
4544 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4545 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4546 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4547 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4548 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4549 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4550 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4551 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4552 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4554 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4555 %3 = icmp ugt <16 x i32> %2, <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7>
4556 %4 = sext <16 x i1> %3 to <16 x i32>
4560 define <16 x i32> @ult_8_v16i32(<16 x i32> %0) {
4561 ; AVX512F-LABEL: ult_8_v16i32:
4563 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4564 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4565 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4566 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4567 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4568 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4569 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4570 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4571 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4572 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4573 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4574 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4575 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4576 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4577 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4578 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4579 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4580 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4581 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4582 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4583 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4584 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4585 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4586 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4587 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4588 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4589 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4590 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4591 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4592 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4593 ; AVX512F-NEXT: retq
4595 ; AVX512BW-LABEL: ult_8_v16i32:
4596 ; AVX512BW: # %bb.0:
4597 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4598 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4599 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4600 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4601 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4602 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4603 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4604 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4605 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4606 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4607 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4608 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4609 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4610 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4611 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4612 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4613 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4614 ; AVX512BW-NEXT: retq
4616 ; AVX512VPOPCNTDQ-LABEL: ult_8_v16i32:
4617 ; AVX512VPOPCNTDQ: # %bb.0:
4618 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4619 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4620 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4621 ; AVX512VPOPCNTDQ-NEXT: retq
4623 ; BITALG-LABEL: ult_8_v16i32:
4625 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4626 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4627 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4628 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4629 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4630 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4631 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4632 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4633 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4635 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4636 %3 = icmp ult <16 x i32> %2, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
4637 %4 = sext <16 x i1> %3 to <16 x i32>
4641 define <16 x i32> @ugt_8_v16i32(<16 x i32> %0) {
4642 ; AVX512F-LABEL: ugt_8_v16i32:
4644 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4645 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4646 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4647 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4648 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4649 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4650 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4651 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4652 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4653 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4654 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4655 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4656 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4657 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4658 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4659 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4660 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4661 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4662 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4663 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4664 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4665 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4666 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4667 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4668 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4669 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4670 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4671 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4672 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4673 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4674 ; AVX512F-NEXT: retq
4676 ; AVX512BW-LABEL: ugt_8_v16i32:
4677 ; AVX512BW: # %bb.0:
4678 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4679 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4680 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4681 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4682 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4683 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4684 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4685 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4686 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4687 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4688 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4689 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4690 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4691 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4692 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4693 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4694 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4695 ; AVX512BW-NEXT: retq
4697 ; AVX512VPOPCNTDQ-LABEL: ugt_8_v16i32:
4698 ; AVX512VPOPCNTDQ: # %bb.0:
4699 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4700 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4701 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4702 ; AVX512VPOPCNTDQ-NEXT: retq
4704 ; BITALG-LABEL: ugt_8_v16i32:
4706 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4707 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4708 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4709 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4710 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4711 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4712 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4713 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4714 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4716 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4717 %3 = icmp ugt <16 x i32> %2, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
4718 %4 = sext <16 x i1> %3 to <16 x i32>
4722 define <16 x i32> @ult_9_v16i32(<16 x i32> %0) {
4723 ; AVX512F-LABEL: ult_9_v16i32:
4725 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4726 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4727 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4728 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4729 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4730 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4731 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4732 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4733 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4734 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4735 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4736 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4737 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4738 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4739 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4740 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4741 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4742 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4743 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4744 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4745 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4746 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4747 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4748 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4749 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4750 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4751 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4752 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4753 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4754 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4755 ; AVX512F-NEXT: retq
4757 ; AVX512BW-LABEL: ult_9_v16i32:
4758 ; AVX512BW: # %bb.0:
4759 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4760 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4761 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4762 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4763 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4764 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4765 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4766 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4767 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4768 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4769 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4770 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4771 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4772 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4773 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4774 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4775 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4776 ; AVX512BW-NEXT: retq
4778 ; AVX512VPOPCNTDQ-LABEL: ult_9_v16i32:
4779 ; AVX512VPOPCNTDQ: # %bb.0:
4780 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4781 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4782 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4783 ; AVX512VPOPCNTDQ-NEXT: retq
4785 ; BITALG-LABEL: ult_9_v16i32:
4787 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4788 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4789 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4790 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4791 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4792 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4793 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4794 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4795 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4797 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4798 %3 = icmp ult <16 x i32> %2, <i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9>
4799 %4 = sext <16 x i1> %3 to <16 x i32>
4803 define <16 x i32> @ugt_9_v16i32(<16 x i32> %0) {
4804 ; AVX512F-LABEL: ugt_9_v16i32:
4806 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4807 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4808 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4809 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4810 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4811 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4812 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4813 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4814 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4815 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4816 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4817 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4818 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4819 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4820 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4821 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4822 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4823 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4824 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4825 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4826 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4827 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4828 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4829 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4830 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4831 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4832 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4833 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4834 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4835 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4836 ; AVX512F-NEXT: retq
4838 ; AVX512BW-LABEL: ugt_9_v16i32:
4839 ; AVX512BW: # %bb.0:
4840 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4841 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4842 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4843 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4844 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4845 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4846 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4847 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4848 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4849 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4850 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4851 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4852 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4853 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4854 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4855 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4856 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4857 ; AVX512BW-NEXT: retq
4859 ; AVX512VPOPCNTDQ-LABEL: ugt_9_v16i32:
4860 ; AVX512VPOPCNTDQ: # %bb.0:
4861 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4862 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4863 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4864 ; AVX512VPOPCNTDQ-NEXT: retq
4866 ; BITALG-LABEL: ugt_9_v16i32:
4868 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4869 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4870 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4871 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4872 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4873 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4874 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4875 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4876 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4878 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4879 %3 = icmp ugt <16 x i32> %2, <i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9>
4880 %4 = sext <16 x i1> %3 to <16 x i32>
4884 define <16 x i32> @ult_10_v16i32(<16 x i32> %0) {
4885 ; AVX512F-LABEL: ult_10_v16i32:
4887 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4888 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4889 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4890 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4891 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4892 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4893 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4894 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4895 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4896 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4897 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4898 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4899 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4900 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4901 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4902 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4903 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4904 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4905 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4906 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4907 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4908 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4909 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4910 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4911 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4912 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4913 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4914 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4915 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4916 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4917 ; AVX512F-NEXT: retq
4919 ; AVX512BW-LABEL: ult_10_v16i32:
4920 ; AVX512BW: # %bb.0:
4921 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4922 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4923 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4924 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
4925 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4926 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4927 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4928 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4929 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4930 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4931 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4932 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4933 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4934 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4935 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4936 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4937 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4938 ; AVX512BW-NEXT: retq
4940 ; AVX512VPOPCNTDQ-LABEL: ult_10_v16i32:
4941 ; AVX512VPOPCNTDQ: # %bb.0:
4942 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4943 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4944 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4945 ; AVX512VPOPCNTDQ-NEXT: retq
4947 ; BITALG-LABEL: ult_10_v16i32:
4949 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4950 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4951 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4952 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4953 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4954 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4955 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4956 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4957 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4959 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4960 %3 = icmp ult <16 x i32> %2, <i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10>
4961 %4 = sext <16 x i1> %3 to <16 x i32>
4965 define <16 x i32> @ugt_10_v16i32(<16 x i32> %0) {
4966 ; AVX512F-LABEL: ugt_10_v16i32:
4968 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4969 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4970 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4971 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4972 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
4973 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4974 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4975 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4976 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4977 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4978 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4979 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4980 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4981 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4982 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4983 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4984 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4985 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4986 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4987 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4988 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4989 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4990 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4991 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4992 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4993 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4994 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4995 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4996 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4997 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4998 ; AVX512F-NEXT: retq
5000 ; AVX512BW-LABEL: ugt_10_v16i32:
5001 ; AVX512BW: # %bb.0:
5002 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5003 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5004 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5005 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5006 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5007 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5008 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5009 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5010 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5011 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5012 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5013 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5014 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5015 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5016 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5017 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5018 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5019 ; AVX512BW-NEXT: retq
5021 ; AVX512VPOPCNTDQ-LABEL: ugt_10_v16i32:
5022 ; AVX512VPOPCNTDQ: # %bb.0:
5023 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5024 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5025 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5026 ; AVX512VPOPCNTDQ-NEXT: retq
5028 ; BITALG-LABEL: ugt_10_v16i32:
5030 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5031 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5032 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5033 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5034 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5035 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5036 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5037 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5038 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5040 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5041 %3 = icmp ugt <16 x i32> %2, <i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10>
5042 %4 = sext <16 x i1> %3 to <16 x i32>
5046 define <16 x i32> @ult_11_v16i32(<16 x i32> %0) {
5047 ; AVX512F-LABEL: ult_11_v16i32:
5049 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5050 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5051 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5052 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5053 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5054 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5055 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5056 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5057 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5058 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5059 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5060 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5061 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5062 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5063 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5064 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5065 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5066 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5067 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5068 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5069 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5070 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5071 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5072 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5073 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5074 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5075 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5076 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5077 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5078 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5079 ; AVX512F-NEXT: retq
5081 ; AVX512BW-LABEL: ult_11_v16i32:
5082 ; AVX512BW: # %bb.0:
5083 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5084 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5085 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5086 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5087 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5088 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5089 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5090 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5091 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5092 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5093 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5094 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5095 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5096 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5097 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5098 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5099 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5100 ; AVX512BW-NEXT: retq
5102 ; AVX512VPOPCNTDQ-LABEL: ult_11_v16i32:
5103 ; AVX512VPOPCNTDQ: # %bb.0:
5104 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5105 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5106 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5107 ; AVX512VPOPCNTDQ-NEXT: retq
5109 ; BITALG-LABEL: ult_11_v16i32:
5111 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5112 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5113 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5114 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5115 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5116 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5117 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5118 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5119 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5121 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5122 %3 = icmp ult <16 x i32> %2, <i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11>
5123 %4 = sext <16 x i1> %3 to <16 x i32>
5127 define <16 x i32> @ugt_11_v16i32(<16 x i32> %0) {
5128 ; AVX512F-LABEL: ugt_11_v16i32:
5130 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5131 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5132 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5133 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5134 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5135 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5136 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5137 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5138 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5139 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5140 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5141 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5142 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5143 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5144 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5145 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5146 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5147 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5148 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5149 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5150 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5151 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5152 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5153 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5154 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5155 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5156 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5157 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5158 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5159 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5160 ; AVX512F-NEXT: retq
5162 ; AVX512BW-LABEL: ugt_11_v16i32:
5163 ; AVX512BW: # %bb.0:
5164 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5165 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5166 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5167 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5168 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5169 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5170 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5171 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5172 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5173 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5174 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5175 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5176 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5177 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5178 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5179 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5180 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5181 ; AVX512BW-NEXT: retq
5183 ; AVX512VPOPCNTDQ-LABEL: ugt_11_v16i32:
5184 ; AVX512VPOPCNTDQ: # %bb.0:
5185 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5186 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5187 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5188 ; AVX512VPOPCNTDQ-NEXT: retq
5190 ; BITALG-LABEL: ugt_11_v16i32:
5192 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5193 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5194 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5195 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5196 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5197 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5198 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5199 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5200 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5202 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5203 %3 = icmp ugt <16 x i32> %2, <i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11>
5204 %4 = sext <16 x i1> %3 to <16 x i32>
5208 define <16 x i32> @ult_12_v16i32(<16 x i32> %0) {
5209 ; AVX512F-LABEL: ult_12_v16i32:
5211 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5212 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5213 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5214 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5215 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5216 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5217 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5218 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5219 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5220 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5221 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5222 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5223 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5224 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5225 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5226 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5227 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5228 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5229 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5230 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5231 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5232 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5233 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5234 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5235 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5236 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5237 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5238 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5239 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5240 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5241 ; AVX512F-NEXT: retq
5243 ; AVX512BW-LABEL: ult_12_v16i32:
5244 ; AVX512BW: # %bb.0:
5245 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5246 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5247 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5248 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5249 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5250 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5251 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5252 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5253 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5254 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5255 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5256 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5257 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5258 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5259 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5260 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5261 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5262 ; AVX512BW-NEXT: retq
5264 ; AVX512VPOPCNTDQ-LABEL: ult_12_v16i32:
5265 ; AVX512VPOPCNTDQ: # %bb.0:
5266 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5267 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5268 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5269 ; AVX512VPOPCNTDQ-NEXT: retq
5271 ; BITALG-LABEL: ult_12_v16i32:
5273 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5274 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5275 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5276 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5277 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5278 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5279 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5280 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5281 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5283 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5284 %3 = icmp ult <16 x i32> %2, <i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12>
5285 %4 = sext <16 x i1> %3 to <16 x i32>
5289 define <16 x i32> @ugt_12_v16i32(<16 x i32> %0) {
5290 ; AVX512F-LABEL: ugt_12_v16i32:
5292 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5293 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5294 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5295 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5296 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5297 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5298 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5299 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5300 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5301 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5302 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5303 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5304 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5305 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5306 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5307 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5308 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5309 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5310 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5311 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5312 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5313 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5314 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5315 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5316 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5317 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5318 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5319 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5320 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5321 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5322 ; AVX512F-NEXT: retq
5324 ; AVX512BW-LABEL: ugt_12_v16i32:
5325 ; AVX512BW: # %bb.0:
5326 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5327 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5328 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5329 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5330 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5331 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5332 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5333 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5334 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5335 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5336 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5337 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5338 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5339 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5340 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5341 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5342 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5343 ; AVX512BW-NEXT: retq
5345 ; AVX512VPOPCNTDQ-LABEL: ugt_12_v16i32:
5346 ; AVX512VPOPCNTDQ: # %bb.0:
5347 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5348 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5349 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5350 ; AVX512VPOPCNTDQ-NEXT: retq
5352 ; BITALG-LABEL: ugt_12_v16i32:
5354 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5355 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5356 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5357 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5358 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5359 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5360 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5361 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5362 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5364 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5365 %3 = icmp ugt <16 x i32> %2, <i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12>
5366 %4 = sext <16 x i1> %3 to <16 x i32>
5370 define <16 x i32> @ult_13_v16i32(<16 x i32> %0) {
5371 ; AVX512F-LABEL: ult_13_v16i32:
5373 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5374 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5375 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5376 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5377 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5378 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5379 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5380 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5381 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5382 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5383 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5384 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5385 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5386 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5387 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5388 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5389 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5390 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5391 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5392 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5393 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5394 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5395 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5396 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5397 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5398 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5399 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5400 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5401 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5402 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5403 ; AVX512F-NEXT: retq
5405 ; AVX512BW-LABEL: ult_13_v16i32:
5406 ; AVX512BW: # %bb.0:
5407 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5408 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5409 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5410 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5411 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5412 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5413 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5414 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5415 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5416 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5417 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5418 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5419 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5420 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5421 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5422 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5423 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5424 ; AVX512BW-NEXT: retq
5426 ; AVX512VPOPCNTDQ-LABEL: ult_13_v16i32:
5427 ; AVX512VPOPCNTDQ: # %bb.0:
5428 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5429 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5430 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5431 ; AVX512VPOPCNTDQ-NEXT: retq
5433 ; BITALG-LABEL: ult_13_v16i32:
5435 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5436 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5437 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5438 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5439 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5440 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5441 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5442 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5443 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5445 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5446 %3 = icmp ult <16 x i32> %2, <i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13>
5447 %4 = sext <16 x i1> %3 to <16 x i32>
5451 define <16 x i32> @ugt_13_v16i32(<16 x i32> %0) {
5452 ; AVX512F-LABEL: ugt_13_v16i32:
5454 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5455 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5456 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5457 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5458 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5459 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5460 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5461 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5462 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5463 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5464 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5465 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5466 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5467 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5468 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5469 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5470 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5471 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5472 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5473 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5474 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5475 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5476 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5477 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5478 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5479 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5480 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5481 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5482 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5483 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5484 ; AVX512F-NEXT: retq
5486 ; AVX512BW-LABEL: ugt_13_v16i32:
5487 ; AVX512BW: # %bb.0:
5488 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5489 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5490 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5491 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5492 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5493 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5494 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5495 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5496 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5497 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5498 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5499 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5500 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5501 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5502 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5503 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5504 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5505 ; AVX512BW-NEXT: retq
5507 ; AVX512VPOPCNTDQ-LABEL: ugt_13_v16i32:
5508 ; AVX512VPOPCNTDQ: # %bb.0:
5509 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5510 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5511 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5512 ; AVX512VPOPCNTDQ-NEXT: retq
5514 ; BITALG-LABEL: ugt_13_v16i32:
5516 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5517 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5518 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5519 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5520 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5521 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5522 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5523 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5524 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5526 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5527 %3 = icmp ugt <16 x i32> %2, <i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13>
5528 %4 = sext <16 x i1> %3 to <16 x i32>
5532 define <16 x i32> @ult_14_v16i32(<16 x i32> %0) {
5533 ; AVX512F-LABEL: ult_14_v16i32:
5535 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5536 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5537 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5538 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5539 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5540 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5541 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5542 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5543 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5544 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5545 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5546 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5547 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5548 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5549 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5550 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5551 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5552 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5553 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5554 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5555 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5556 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5557 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5558 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5559 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5560 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5561 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5562 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5563 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5564 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5565 ; AVX512F-NEXT: retq
5567 ; AVX512BW-LABEL: ult_14_v16i32:
5568 ; AVX512BW: # %bb.0:
5569 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5570 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5571 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5572 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5573 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5574 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5575 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5576 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5577 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5578 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5579 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5580 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5581 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5582 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5583 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5584 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5585 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5586 ; AVX512BW-NEXT: retq
5588 ; AVX512VPOPCNTDQ-LABEL: ult_14_v16i32:
5589 ; AVX512VPOPCNTDQ: # %bb.0:
5590 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5591 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5592 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5593 ; AVX512VPOPCNTDQ-NEXT: retq
5595 ; BITALG-LABEL: ult_14_v16i32:
5597 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5598 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5599 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5600 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5601 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5602 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5603 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5604 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5605 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5607 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5608 %3 = icmp ult <16 x i32> %2, <i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14>
5609 %4 = sext <16 x i1> %3 to <16 x i32>
5613 define <16 x i32> @ugt_14_v16i32(<16 x i32> %0) {
5614 ; AVX512F-LABEL: ugt_14_v16i32:
5616 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5617 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5618 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5619 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5620 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5621 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5622 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5623 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5624 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5625 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5626 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5627 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5628 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5629 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5630 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5631 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5632 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5633 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5634 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5635 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5636 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5637 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5638 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5639 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5640 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5641 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5642 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5643 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5644 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5645 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5646 ; AVX512F-NEXT: retq
5648 ; AVX512BW-LABEL: ugt_14_v16i32:
5649 ; AVX512BW: # %bb.0:
5650 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5651 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5652 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5653 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5654 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5655 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5656 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5657 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5658 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5659 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5660 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5661 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5662 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5663 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5664 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5665 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5666 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5667 ; AVX512BW-NEXT: retq
5669 ; AVX512VPOPCNTDQ-LABEL: ugt_14_v16i32:
5670 ; AVX512VPOPCNTDQ: # %bb.0:
5671 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5672 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5673 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5674 ; AVX512VPOPCNTDQ-NEXT: retq
5676 ; BITALG-LABEL: ugt_14_v16i32:
5678 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5679 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5680 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5681 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5682 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5683 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5684 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5685 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5686 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5688 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5689 %3 = icmp ugt <16 x i32> %2, <i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14>
5690 %4 = sext <16 x i1> %3 to <16 x i32>
5694 define <16 x i32> @ult_15_v16i32(<16 x i32> %0) {
5695 ; AVX512F-LABEL: ult_15_v16i32:
5697 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5698 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5699 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5700 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5701 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5702 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5703 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5704 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5705 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5706 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5707 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5708 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5709 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5710 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5711 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5712 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5713 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5714 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5715 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5716 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5717 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5718 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5719 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5720 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5721 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5722 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5723 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5724 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5725 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5726 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5727 ; AVX512F-NEXT: retq
5729 ; AVX512BW-LABEL: ult_15_v16i32:
5730 ; AVX512BW: # %bb.0:
5731 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5732 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5733 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5734 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5735 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5736 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5737 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5738 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5739 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5740 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5741 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5742 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5743 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5744 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5745 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5746 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5747 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5748 ; AVX512BW-NEXT: retq
5750 ; AVX512VPOPCNTDQ-LABEL: ult_15_v16i32:
5751 ; AVX512VPOPCNTDQ: # %bb.0:
5752 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5753 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5754 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5755 ; AVX512VPOPCNTDQ-NEXT: retq
5757 ; BITALG-LABEL: ult_15_v16i32:
5759 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5760 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5761 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5762 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5763 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5764 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5765 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5766 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5767 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5769 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5770 %3 = icmp ult <16 x i32> %2, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
5771 %4 = sext <16 x i1> %3 to <16 x i32>
5775 define <16 x i32> @ugt_15_v16i32(<16 x i32> %0) {
5776 ; AVX512F-LABEL: ugt_15_v16i32:
5778 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5779 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5780 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5781 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5782 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5783 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5784 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5785 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5786 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5787 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5788 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5789 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5790 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5791 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5792 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5793 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5794 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5795 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5796 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5797 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5798 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5799 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5800 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5801 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5802 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5803 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5804 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5805 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5806 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5807 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5808 ; AVX512F-NEXT: retq
5810 ; AVX512BW-LABEL: ugt_15_v16i32:
5811 ; AVX512BW: # %bb.0:
5812 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5813 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5814 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5815 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5816 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5817 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5818 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5819 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5820 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5821 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5822 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5823 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5824 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5825 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5826 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5827 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5828 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5829 ; AVX512BW-NEXT: retq
5831 ; AVX512VPOPCNTDQ-LABEL: ugt_15_v16i32:
5832 ; AVX512VPOPCNTDQ: # %bb.0:
5833 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5834 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5835 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5836 ; AVX512VPOPCNTDQ-NEXT: retq
5838 ; BITALG-LABEL: ugt_15_v16i32:
5840 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5841 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5842 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5843 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5844 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5845 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5846 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5847 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5848 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5850 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5851 %3 = icmp ugt <16 x i32> %2, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
5852 %4 = sext <16 x i1> %3 to <16 x i32>
5856 define <16 x i32> @ult_16_v16i32(<16 x i32> %0) {
5857 ; AVX512F-LABEL: ult_16_v16i32:
5859 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5860 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5861 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5862 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5863 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5864 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5865 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5866 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5867 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5868 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5869 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5870 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5871 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5872 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5873 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5874 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5875 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5876 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5877 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5878 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5879 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5880 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5881 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5882 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5883 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5884 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5885 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5886 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5887 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5888 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5889 ; AVX512F-NEXT: retq
5891 ; AVX512BW-LABEL: ult_16_v16i32:
5892 ; AVX512BW: # %bb.0:
5893 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5894 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5895 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5896 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5897 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5898 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5899 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5900 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5901 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5902 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5903 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5904 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5905 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5906 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5907 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5908 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5909 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5910 ; AVX512BW-NEXT: retq
5912 ; AVX512VPOPCNTDQ-LABEL: ult_16_v16i32:
5913 ; AVX512VPOPCNTDQ: # %bb.0:
5914 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5915 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5916 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5917 ; AVX512VPOPCNTDQ-NEXT: retq
5919 ; BITALG-LABEL: ult_16_v16i32:
5921 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5922 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5923 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5924 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5925 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5926 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5927 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5928 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5929 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5931 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5932 %3 = icmp ult <16 x i32> %2, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
5933 %4 = sext <16 x i1> %3 to <16 x i32>
5937 define <16 x i32> @ugt_16_v16i32(<16 x i32> %0) {
5938 ; AVX512F-LABEL: ugt_16_v16i32:
5940 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5941 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5942 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5943 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5944 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
5945 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5946 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5947 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5948 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5949 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5950 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5951 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5952 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5953 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5954 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5955 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5956 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5957 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5958 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5959 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5960 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5961 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5962 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5963 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5964 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5965 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5966 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5967 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5968 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5969 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5970 ; AVX512F-NEXT: retq
5972 ; AVX512BW-LABEL: ugt_16_v16i32:
5973 ; AVX512BW: # %bb.0:
5974 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5975 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5976 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5977 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
5978 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5979 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5980 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5981 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5982 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5983 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5984 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5985 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5986 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5987 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5988 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5989 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5990 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5991 ; AVX512BW-NEXT: retq
5993 ; AVX512VPOPCNTDQ-LABEL: ugt_16_v16i32:
5994 ; AVX512VPOPCNTDQ: # %bb.0:
5995 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5996 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5997 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5998 ; AVX512VPOPCNTDQ-NEXT: retq
6000 ; BITALG-LABEL: ugt_16_v16i32:
6002 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6003 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6004 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6005 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6006 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6007 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6008 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6009 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6010 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6012 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6013 %3 = icmp ugt <16 x i32> %2, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
6014 %4 = sext <16 x i1> %3 to <16 x i32>
6018 define <16 x i32> @ult_17_v16i32(<16 x i32> %0) {
6019 ; AVX512F-LABEL: ult_17_v16i32:
6021 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6022 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6023 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6024 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6025 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6026 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6027 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6028 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6029 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6030 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6031 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6032 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6033 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6034 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6035 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6036 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6037 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6038 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6039 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6040 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6041 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6042 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6043 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6044 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6045 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6046 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6047 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6048 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6049 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6050 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6051 ; AVX512F-NEXT: retq
6053 ; AVX512BW-LABEL: ult_17_v16i32:
6054 ; AVX512BW: # %bb.0:
6055 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6056 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6057 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6058 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6059 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6060 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6061 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6062 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6063 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6064 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6065 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6066 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6067 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6068 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6069 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6070 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6071 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6072 ; AVX512BW-NEXT: retq
6074 ; AVX512VPOPCNTDQ-LABEL: ult_17_v16i32:
6075 ; AVX512VPOPCNTDQ: # %bb.0:
6076 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6077 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6078 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6079 ; AVX512VPOPCNTDQ-NEXT: retq
6081 ; BITALG-LABEL: ult_17_v16i32:
6083 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6084 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6085 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6086 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6087 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6088 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6089 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6090 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6091 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6093 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6094 %3 = icmp ult <16 x i32> %2, <i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17>
6095 %4 = sext <16 x i1> %3 to <16 x i32>
6099 define <16 x i32> @ugt_17_v16i32(<16 x i32> %0) {
6100 ; AVX512F-LABEL: ugt_17_v16i32:
6102 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6103 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6104 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6105 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6106 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6107 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6108 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6109 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6110 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6111 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6112 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6113 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6114 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6115 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6116 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6117 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6118 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6119 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6120 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6121 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6122 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6123 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6124 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6125 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6126 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6127 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6128 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6129 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6130 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6131 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6132 ; AVX512F-NEXT: retq
6134 ; AVX512BW-LABEL: ugt_17_v16i32:
6135 ; AVX512BW: # %bb.0:
6136 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6137 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6138 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6139 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6140 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6141 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6142 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6143 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6144 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6145 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6146 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6147 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6148 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6149 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6150 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6151 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6152 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6153 ; AVX512BW-NEXT: retq
6155 ; AVX512VPOPCNTDQ-LABEL: ugt_17_v16i32:
6156 ; AVX512VPOPCNTDQ: # %bb.0:
6157 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6158 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6159 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6160 ; AVX512VPOPCNTDQ-NEXT: retq
6162 ; BITALG-LABEL: ugt_17_v16i32:
6164 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6165 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6166 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6167 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6168 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6169 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6170 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6171 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6172 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6174 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6175 %3 = icmp ugt <16 x i32> %2, <i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17>
6176 %4 = sext <16 x i1> %3 to <16 x i32>
6180 define <16 x i32> @ult_18_v16i32(<16 x i32> %0) {
6181 ; AVX512F-LABEL: ult_18_v16i32:
6183 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6184 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6185 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6186 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6187 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6188 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6189 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6190 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6191 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6192 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6193 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6194 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6195 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6196 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6197 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6198 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6199 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6200 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6201 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6202 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6203 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6204 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6205 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6206 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6207 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6208 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6209 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6210 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6211 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6212 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6213 ; AVX512F-NEXT: retq
6215 ; AVX512BW-LABEL: ult_18_v16i32:
6216 ; AVX512BW: # %bb.0:
6217 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6218 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6219 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6220 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6221 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6222 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6223 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6224 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6225 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6226 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6227 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6228 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6229 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6230 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6231 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6232 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6233 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6234 ; AVX512BW-NEXT: retq
6236 ; AVX512VPOPCNTDQ-LABEL: ult_18_v16i32:
6237 ; AVX512VPOPCNTDQ: # %bb.0:
6238 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6239 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6240 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6241 ; AVX512VPOPCNTDQ-NEXT: retq
6243 ; BITALG-LABEL: ult_18_v16i32:
6245 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6246 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6247 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6248 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6249 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6250 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6251 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6252 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6253 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6255 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6256 %3 = icmp ult <16 x i32> %2, <i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18>
6257 %4 = sext <16 x i1> %3 to <16 x i32>
6261 define <16 x i32> @ugt_18_v16i32(<16 x i32> %0) {
6262 ; AVX512F-LABEL: ugt_18_v16i32:
6264 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6265 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6266 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6267 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6268 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6269 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6270 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6271 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6272 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6273 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6274 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6275 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6276 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6277 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6278 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6279 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6280 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6281 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6282 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6283 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6284 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6285 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6286 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6287 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6288 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6289 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6290 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6291 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6292 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6293 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6294 ; AVX512F-NEXT: retq
6296 ; AVX512BW-LABEL: ugt_18_v16i32:
6297 ; AVX512BW: # %bb.0:
6298 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6299 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6300 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6301 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6302 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6303 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6304 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6305 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6306 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6307 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6308 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6309 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6310 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6311 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6312 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6313 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6314 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6315 ; AVX512BW-NEXT: retq
6317 ; AVX512VPOPCNTDQ-LABEL: ugt_18_v16i32:
6318 ; AVX512VPOPCNTDQ: # %bb.0:
6319 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6320 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6321 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6322 ; AVX512VPOPCNTDQ-NEXT: retq
6324 ; BITALG-LABEL: ugt_18_v16i32:
6326 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6327 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6328 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6329 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6330 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6331 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6332 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6333 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6334 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6336 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6337 %3 = icmp ugt <16 x i32> %2, <i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18>
6338 %4 = sext <16 x i1> %3 to <16 x i32>
6342 define <16 x i32> @ult_19_v16i32(<16 x i32> %0) {
6343 ; AVX512F-LABEL: ult_19_v16i32:
6345 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6346 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6347 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6348 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6349 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6350 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6351 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6352 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6353 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6354 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6355 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6356 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6357 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6358 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6359 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6360 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6361 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6362 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6363 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6364 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6365 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6366 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6367 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6368 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6369 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6370 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6371 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6372 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6373 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6374 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6375 ; AVX512F-NEXT: retq
6377 ; AVX512BW-LABEL: ult_19_v16i32:
6378 ; AVX512BW: # %bb.0:
6379 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6380 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6381 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6382 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6383 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6384 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6385 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6386 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6387 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6388 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6389 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6390 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6391 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6392 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6393 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6394 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6395 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6396 ; AVX512BW-NEXT: retq
6398 ; AVX512VPOPCNTDQ-LABEL: ult_19_v16i32:
6399 ; AVX512VPOPCNTDQ: # %bb.0:
6400 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6401 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6402 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6403 ; AVX512VPOPCNTDQ-NEXT: retq
6405 ; BITALG-LABEL: ult_19_v16i32:
6407 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6408 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6409 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6410 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6411 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6412 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6413 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6414 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6415 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6417 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6418 %3 = icmp ult <16 x i32> %2, <i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19>
6419 %4 = sext <16 x i1> %3 to <16 x i32>
6423 define <16 x i32> @ugt_19_v16i32(<16 x i32> %0) {
6424 ; AVX512F-LABEL: ugt_19_v16i32:
6426 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6427 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6428 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6429 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6430 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6431 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6432 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6433 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6434 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6435 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6436 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6437 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6438 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6439 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6440 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6441 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6442 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6443 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6444 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6445 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6446 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6447 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6448 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6449 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6450 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6451 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6452 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6453 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6454 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6455 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6456 ; AVX512F-NEXT: retq
6458 ; AVX512BW-LABEL: ugt_19_v16i32:
6459 ; AVX512BW: # %bb.0:
6460 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6461 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6462 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6463 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6464 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6465 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6466 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6467 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6468 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6469 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6470 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6471 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6472 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6473 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6474 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6475 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6476 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6477 ; AVX512BW-NEXT: retq
6479 ; AVX512VPOPCNTDQ-LABEL: ugt_19_v16i32:
6480 ; AVX512VPOPCNTDQ: # %bb.0:
6481 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6482 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6483 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6484 ; AVX512VPOPCNTDQ-NEXT: retq
6486 ; BITALG-LABEL: ugt_19_v16i32:
6488 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6489 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6490 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6491 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6492 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6493 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6494 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6495 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6496 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6498 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6499 %3 = icmp ugt <16 x i32> %2, <i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19>
6500 %4 = sext <16 x i1> %3 to <16 x i32>
6504 define <16 x i32> @ult_20_v16i32(<16 x i32> %0) {
6505 ; AVX512F-LABEL: ult_20_v16i32:
6507 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6508 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6509 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6510 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6511 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6512 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6513 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6514 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6515 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6516 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6517 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6518 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6519 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6520 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6521 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6522 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6523 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6524 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6525 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6526 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6527 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6528 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6529 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6530 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6531 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6532 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6533 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6534 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6535 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6536 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6537 ; AVX512F-NEXT: retq
6539 ; AVX512BW-LABEL: ult_20_v16i32:
6540 ; AVX512BW: # %bb.0:
6541 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6542 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6543 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6544 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6545 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6546 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6547 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6548 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6549 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6550 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6551 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6552 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6553 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6554 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6555 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6556 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6557 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6558 ; AVX512BW-NEXT: retq
6560 ; AVX512VPOPCNTDQ-LABEL: ult_20_v16i32:
6561 ; AVX512VPOPCNTDQ: # %bb.0:
6562 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6563 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6564 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6565 ; AVX512VPOPCNTDQ-NEXT: retq
6567 ; BITALG-LABEL: ult_20_v16i32:
6569 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6570 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6571 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6572 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6573 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6574 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6575 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6576 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6577 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6579 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6580 %3 = icmp ult <16 x i32> %2, <i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20>
6581 %4 = sext <16 x i1> %3 to <16 x i32>
6585 define <16 x i32> @ugt_20_v16i32(<16 x i32> %0) {
6586 ; AVX512F-LABEL: ugt_20_v16i32:
6588 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6589 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6590 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6591 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6592 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6593 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6594 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6595 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6596 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6597 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6598 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6599 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6600 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6601 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6602 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6603 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6604 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6605 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6606 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6607 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6608 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6609 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6610 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6611 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6612 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6613 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6614 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6615 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6616 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6617 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6618 ; AVX512F-NEXT: retq
6620 ; AVX512BW-LABEL: ugt_20_v16i32:
6621 ; AVX512BW: # %bb.0:
6622 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6623 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6624 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6625 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6626 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6627 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6628 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6629 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6630 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6631 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6632 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6633 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6634 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6635 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6636 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6637 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6638 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6639 ; AVX512BW-NEXT: retq
6641 ; AVX512VPOPCNTDQ-LABEL: ugt_20_v16i32:
6642 ; AVX512VPOPCNTDQ: # %bb.0:
6643 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6644 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6645 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6646 ; AVX512VPOPCNTDQ-NEXT: retq
6648 ; BITALG-LABEL: ugt_20_v16i32:
6650 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6651 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6652 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6653 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6654 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6655 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6656 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6657 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6658 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6660 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6661 %3 = icmp ugt <16 x i32> %2, <i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20>
6662 %4 = sext <16 x i1> %3 to <16 x i32>
6666 define <16 x i32> @ult_21_v16i32(<16 x i32> %0) {
6667 ; AVX512F-LABEL: ult_21_v16i32:
6669 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6670 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6671 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6672 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6673 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6674 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6675 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6676 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6677 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6678 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6679 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6680 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6681 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6682 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6683 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6684 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6685 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6686 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6687 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6688 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6689 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6690 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6691 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6692 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6693 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6694 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6695 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6696 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6697 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6698 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6699 ; AVX512F-NEXT: retq
6701 ; AVX512BW-LABEL: ult_21_v16i32:
6702 ; AVX512BW: # %bb.0:
6703 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6704 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6705 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6706 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6707 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6708 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6709 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6710 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6711 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6712 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6713 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6714 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6715 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6716 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6717 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6718 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6719 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6720 ; AVX512BW-NEXT: retq
6722 ; AVX512VPOPCNTDQ-LABEL: ult_21_v16i32:
6723 ; AVX512VPOPCNTDQ: # %bb.0:
6724 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6725 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6726 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6727 ; AVX512VPOPCNTDQ-NEXT: retq
6729 ; BITALG-LABEL: ult_21_v16i32:
6731 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6732 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6733 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6734 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6735 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6736 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6737 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6738 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6739 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6741 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6742 %3 = icmp ult <16 x i32> %2, <i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21>
6743 %4 = sext <16 x i1> %3 to <16 x i32>
6747 define <16 x i32> @ugt_21_v16i32(<16 x i32> %0) {
6748 ; AVX512F-LABEL: ugt_21_v16i32:
6750 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6751 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6752 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6753 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6754 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6755 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6756 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6757 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6758 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6759 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6760 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6761 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6762 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6763 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6764 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6765 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6766 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6767 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6768 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6769 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6770 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6771 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6772 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6773 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6774 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6775 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6776 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6777 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6778 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6779 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6780 ; AVX512F-NEXT: retq
6782 ; AVX512BW-LABEL: ugt_21_v16i32:
6783 ; AVX512BW: # %bb.0:
6784 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6785 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6786 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6787 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6788 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6789 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6790 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6791 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6792 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6793 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6794 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6795 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6796 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6797 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6798 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6799 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6800 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6801 ; AVX512BW-NEXT: retq
6803 ; AVX512VPOPCNTDQ-LABEL: ugt_21_v16i32:
6804 ; AVX512VPOPCNTDQ: # %bb.0:
6805 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6806 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6807 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6808 ; AVX512VPOPCNTDQ-NEXT: retq
6810 ; BITALG-LABEL: ugt_21_v16i32:
6812 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6813 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6814 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6815 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6816 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6817 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6818 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6819 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6820 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6822 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6823 %3 = icmp ugt <16 x i32> %2, <i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21>
6824 %4 = sext <16 x i1> %3 to <16 x i32>
6828 define <16 x i32> @ult_22_v16i32(<16 x i32> %0) {
6829 ; AVX512F-LABEL: ult_22_v16i32:
6831 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6832 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6833 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6834 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6835 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6836 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6837 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6838 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6839 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6840 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6841 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6842 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6843 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6844 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6845 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6846 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6847 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6848 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6849 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6850 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6851 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6852 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6853 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6854 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6855 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6856 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6857 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6858 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6859 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6860 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6861 ; AVX512F-NEXT: retq
6863 ; AVX512BW-LABEL: ult_22_v16i32:
6864 ; AVX512BW: # %bb.0:
6865 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6866 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6867 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6868 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6869 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6870 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6871 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6872 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6873 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6874 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6875 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6876 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6877 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6878 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6879 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6880 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6881 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6882 ; AVX512BW-NEXT: retq
6884 ; AVX512VPOPCNTDQ-LABEL: ult_22_v16i32:
6885 ; AVX512VPOPCNTDQ: # %bb.0:
6886 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6887 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6888 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6889 ; AVX512VPOPCNTDQ-NEXT: retq
6891 ; BITALG-LABEL: ult_22_v16i32:
6893 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6894 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6895 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6896 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6897 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6898 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6899 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6900 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6901 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6903 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6904 %3 = icmp ult <16 x i32> %2, <i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22>
6905 %4 = sext <16 x i1> %3 to <16 x i32>
6909 define <16 x i32> @ugt_22_v16i32(<16 x i32> %0) {
6910 ; AVX512F-LABEL: ugt_22_v16i32:
6912 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6913 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6914 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6915 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6916 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6917 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6918 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6919 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6920 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6921 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6922 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6923 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6924 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6925 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6926 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6927 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6928 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6929 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6930 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6931 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6932 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6933 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6934 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6935 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6936 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6937 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6938 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6939 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6940 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6941 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6942 ; AVX512F-NEXT: retq
6944 ; AVX512BW-LABEL: ugt_22_v16i32:
6945 ; AVX512BW: # %bb.0:
6946 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6947 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6948 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6949 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
6950 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6951 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6952 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6953 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6954 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6955 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6956 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6957 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6958 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6959 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6960 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6961 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6962 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6963 ; AVX512BW-NEXT: retq
6965 ; AVX512VPOPCNTDQ-LABEL: ugt_22_v16i32:
6966 ; AVX512VPOPCNTDQ: # %bb.0:
6967 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6968 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6969 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6970 ; AVX512VPOPCNTDQ-NEXT: retq
6972 ; BITALG-LABEL: ugt_22_v16i32:
6974 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6975 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6976 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6977 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6978 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6979 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6980 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6981 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6982 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6984 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6985 %3 = icmp ugt <16 x i32> %2, <i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22>
6986 %4 = sext <16 x i1> %3 to <16 x i32>
6990 define <16 x i32> @ult_23_v16i32(<16 x i32> %0) {
6991 ; AVX512F-LABEL: ult_23_v16i32:
6993 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6994 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6995 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6996 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6997 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
6998 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6999 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7000 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7001 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7002 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7003 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7004 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7005 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7006 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7007 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7008 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7009 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7010 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7011 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7012 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7013 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7014 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7015 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7016 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7017 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7018 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7019 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7020 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7021 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7022 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7023 ; AVX512F-NEXT: retq
7025 ; AVX512BW-LABEL: ult_23_v16i32:
7026 ; AVX512BW: # %bb.0:
7027 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7028 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7029 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7030 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7031 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7032 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7033 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7034 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7035 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7036 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7037 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7038 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7039 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7040 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7041 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7042 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7043 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7044 ; AVX512BW-NEXT: retq
7046 ; AVX512VPOPCNTDQ-LABEL: ult_23_v16i32:
7047 ; AVX512VPOPCNTDQ: # %bb.0:
7048 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7049 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7050 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7051 ; AVX512VPOPCNTDQ-NEXT: retq
7053 ; BITALG-LABEL: ult_23_v16i32:
7055 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7056 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7057 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7058 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7059 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7060 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7061 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7062 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7063 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7065 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7066 %3 = icmp ult <16 x i32> %2, <i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23>
7067 %4 = sext <16 x i1> %3 to <16 x i32>
7071 define <16 x i32> @ugt_23_v16i32(<16 x i32> %0) {
7072 ; AVX512F-LABEL: ugt_23_v16i32:
7074 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7075 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7076 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7077 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7078 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7079 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7080 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7081 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7082 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7083 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7084 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7085 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7086 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7087 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7088 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7089 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7090 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7091 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7092 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7093 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7094 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7095 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7096 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7097 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7098 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7099 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7100 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7101 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7102 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7103 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7104 ; AVX512F-NEXT: retq
7106 ; AVX512BW-LABEL: ugt_23_v16i32:
7107 ; AVX512BW: # %bb.0:
7108 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7109 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7110 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7111 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7112 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7113 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7114 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7115 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7116 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7117 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7118 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7119 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7120 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7121 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7122 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7123 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7124 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7125 ; AVX512BW-NEXT: retq
7127 ; AVX512VPOPCNTDQ-LABEL: ugt_23_v16i32:
7128 ; AVX512VPOPCNTDQ: # %bb.0:
7129 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7130 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7131 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7132 ; AVX512VPOPCNTDQ-NEXT: retq
7134 ; BITALG-LABEL: ugt_23_v16i32:
7136 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7137 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7138 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7139 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7140 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7141 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7142 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7143 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7144 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7146 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7147 %3 = icmp ugt <16 x i32> %2, <i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23>
7148 %4 = sext <16 x i1> %3 to <16 x i32>
7152 define <16 x i32> @ult_24_v16i32(<16 x i32> %0) {
7153 ; AVX512F-LABEL: ult_24_v16i32:
7155 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7156 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7157 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7158 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7159 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7160 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7161 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7162 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7163 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7164 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7165 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7166 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7167 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7168 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7169 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7170 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7171 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7172 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7173 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7174 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7175 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7176 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7177 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7178 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7179 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7180 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7181 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7182 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7183 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7184 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7185 ; AVX512F-NEXT: retq
7187 ; AVX512BW-LABEL: ult_24_v16i32:
7188 ; AVX512BW: # %bb.0:
7189 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7190 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7191 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7192 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7193 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7194 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7195 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7196 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7197 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7198 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7199 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7200 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7201 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7202 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7203 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7204 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7205 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7206 ; AVX512BW-NEXT: retq
7208 ; AVX512VPOPCNTDQ-LABEL: ult_24_v16i32:
7209 ; AVX512VPOPCNTDQ: # %bb.0:
7210 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7211 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7212 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7213 ; AVX512VPOPCNTDQ-NEXT: retq
7215 ; BITALG-LABEL: ult_24_v16i32:
7217 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7218 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7219 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7220 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7221 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7222 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7223 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7224 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7225 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7227 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7228 %3 = icmp ult <16 x i32> %2, <i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24>
7229 %4 = sext <16 x i1> %3 to <16 x i32>
7233 define <16 x i32> @ugt_24_v16i32(<16 x i32> %0) {
7234 ; AVX512F-LABEL: ugt_24_v16i32:
7236 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7237 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7238 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7239 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7240 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7241 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7242 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7243 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7244 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7245 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7246 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7247 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7248 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7249 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7250 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7251 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7252 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7253 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7254 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7255 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7256 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7257 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7258 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7259 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7260 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7261 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7262 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7263 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7264 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7265 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7266 ; AVX512F-NEXT: retq
7268 ; AVX512BW-LABEL: ugt_24_v16i32:
7269 ; AVX512BW: # %bb.0:
7270 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7271 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7272 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7273 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7274 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7275 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7276 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7277 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7278 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7279 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7280 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7281 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7282 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7283 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7284 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7285 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7286 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7287 ; AVX512BW-NEXT: retq
7289 ; AVX512VPOPCNTDQ-LABEL: ugt_24_v16i32:
7290 ; AVX512VPOPCNTDQ: # %bb.0:
7291 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7292 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7293 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7294 ; AVX512VPOPCNTDQ-NEXT: retq
7296 ; BITALG-LABEL: ugt_24_v16i32:
7298 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7299 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7300 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7301 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7302 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7303 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7304 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7305 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7306 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7308 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7309 %3 = icmp ugt <16 x i32> %2, <i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24>
7310 %4 = sext <16 x i1> %3 to <16 x i32>
7314 define <16 x i32> @ult_25_v16i32(<16 x i32> %0) {
7315 ; AVX512F-LABEL: ult_25_v16i32:
7317 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7318 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7319 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7320 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7321 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7322 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7323 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7324 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7325 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7326 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7327 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7328 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7329 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7330 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7331 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7332 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7333 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7334 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7335 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7336 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7337 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7338 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7339 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7340 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7341 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7342 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7343 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7344 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7345 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7346 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7347 ; AVX512F-NEXT: retq
7349 ; AVX512BW-LABEL: ult_25_v16i32:
7350 ; AVX512BW: # %bb.0:
7351 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7352 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7353 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7354 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7355 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7356 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7357 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7358 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7359 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7360 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7361 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7362 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7363 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7364 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7365 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7366 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7367 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7368 ; AVX512BW-NEXT: retq
7370 ; AVX512VPOPCNTDQ-LABEL: ult_25_v16i32:
7371 ; AVX512VPOPCNTDQ: # %bb.0:
7372 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7373 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7374 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7375 ; AVX512VPOPCNTDQ-NEXT: retq
7377 ; BITALG-LABEL: ult_25_v16i32:
7379 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7380 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7381 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7382 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7383 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7384 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7385 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7386 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7387 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7389 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7390 %3 = icmp ult <16 x i32> %2, <i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25>
7391 %4 = sext <16 x i1> %3 to <16 x i32>
7395 define <16 x i32> @ugt_25_v16i32(<16 x i32> %0) {
7396 ; AVX512F-LABEL: ugt_25_v16i32:
7398 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7399 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7400 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7401 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7402 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7403 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7404 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7405 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7406 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7407 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7408 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7409 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7410 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7411 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7412 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7413 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7414 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7415 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7416 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7417 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7418 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7419 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7420 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7421 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7422 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7423 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7424 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7425 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7426 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7427 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7428 ; AVX512F-NEXT: retq
7430 ; AVX512BW-LABEL: ugt_25_v16i32:
7431 ; AVX512BW: # %bb.0:
7432 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7433 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7434 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7435 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7436 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7437 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7438 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7439 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7440 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7441 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7442 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7443 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7444 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7445 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7446 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7447 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7448 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7449 ; AVX512BW-NEXT: retq
7451 ; AVX512VPOPCNTDQ-LABEL: ugt_25_v16i32:
7452 ; AVX512VPOPCNTDQ: # %bb.0:
7453 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7454 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7455 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7456 ; AVX512VPOPCNTDQ-NEXT: retq
7458 ; BITALG-LABEL: ugt_25_v16i32:
7460 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7461 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7462 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7463 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7464 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7465 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7466 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7467 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7468 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7470 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7471 %3 = icmp ugt <16 x i32> %2, <i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25>
7472 %4 = sext <16 x i1> %3 to <16 x i32>
7476 define <16 x i32> @ult_26_v16i32(<16 x i32> %0) {
7477 ; AVX512F-LABEL: ult_26_v16i32:
7479 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7480 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7481 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7482 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7483 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7484 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7485 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7486 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7487 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7488 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7489 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7490 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7491 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7492 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7493 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7494 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7495 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7496 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7497 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7498 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7499 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7500 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7501 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7502 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7503 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7504 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7505 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7506 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7507 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7508 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7509 ; AVX512F-NEXT: retq
7511 ; AVX512BW-LABEL: ult_26_v16i32:
7512 ; AVX512BW: # %bb.0:
7513 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7514 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7515 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7516 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7517 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7518 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7519 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7520 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7521 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7522 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7523 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7524 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7525 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7526 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7527 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7528 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7529 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7530 ; AVX512BW-NEXT: retq
7532 ; AVX512VPOPCNTDQ-LABEL: ult_26_v16i32:
7533 ; AVX512VPOPCNTDQ: # %bb.0:
7534 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7535 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7536 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7537 ; AVX512VPOPCNTDQ-NEXT: retq
7539 ; BITALG-LABEL: ult_26_v16i32:
7541 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7542 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7543 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7544 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7545 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7546 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7547 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7548 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7549 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7551 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7552 %3 = icmp ult <16 x i32> %2, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
7553 %4 = sext <16 x i1> %3 to <16 x i32>
7557 define <16 x i32> @ugt_26_v16i32(<16 x i32> %0) {
7558 ; AVX512F-LABEL: ugt_26_v16i32:
7560 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7561 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7562 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7563 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7564 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7565 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7566 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7567 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7568 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7569 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7570 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7571 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7572 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7573 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7574 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7575 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7576 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7577 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7578 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7579 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7580 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7581 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7582 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7583 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7584 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7585 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7586 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7587 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7588 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7589 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7590 ; AVX512F-NEXT: retq
7592 ; AVX512BW-LABEL: ugt_26_v16i32:
7593 ; AVX512BW: # %bb.0:
7594 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7595 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7596 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7597 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7598 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7599 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7600 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7601 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7602 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7603 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7604 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7605 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7606 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7607 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7608 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7609 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7610 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7611 ; AVX512BW-NEXT: retq
7613 ; AVX512VPOPCNTDQ-LABEL: ugt_26_v16i32:
7614 ; AVX512VPOPCNTDQ: # %bb.0:
7615 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7616 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7617 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7618 ; AVX512VPOPCNTDQ-NEXT: retq
7620 ; BITALG-LABEL: ugt_26_v16i32:
7622 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7623 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7624 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7625 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7626 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7627 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7628 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7629 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7630 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7632 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7633 %3 = icmp ugt <16 x i32> %2, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
7634 %4 = sext <16 x i1> %3 to <16 x i32>
7638 define <16 x i32> @ult_27_v16i32(<16 x i32> %0) {
7639 ; AVX512F-LABEL: ult_27_v16i32:
7641 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7642 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7643 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7644 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7645 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7646 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7647 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7648 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7649 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7650 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7651 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7652 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7653 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7654 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7655 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7656 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7657 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7658 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7659 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7660 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7661 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7662 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7663 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7664 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7665 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7666 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7667 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7668 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7669 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7670 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7671 ; AVX512F-NEXT: retq
7673 ; AVX512BW-LABEL: ult_27_v16i32:
7674 ; AVX512BW: # %bb.0:
7675 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7676 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7677 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7678 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7679 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7680 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7681 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7682 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7683 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7684 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7685 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7686 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7687 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7688 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7689 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7690 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7691 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7692 ; AVX512BW-NEXT: retq
7694 ; AVX512VPOPCNTDQ-LABEL: ult_27_v16i32:
7695 ; AVX512VPOPCNTDQ: # %bb.0:
7696 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7697 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7698 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7699 ; AVX512VPOPCNTDQ-NEXT: retq
7701 ; BITALG-LABEL: ult_27_v16i32:
7703 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7704 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7705 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7706 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7707 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7708 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7709 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7710 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7711 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7713 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7714 %3 = icmp ult <16 x i32> %2, <i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27>
7715 %4 = sext <16 x i1> %3 to <16 x i32>
7719 define <16 x i32> @ugt_27_v16i32(<16 x i32> %0) {
7720 ; AVX512F-LABEL: ugt_27_v16i32:
7722 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7723 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7724 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7725 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7726 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7727 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7728 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7729 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7730 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7731 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7732 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7733 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7734 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7735 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7736 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7737 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7738 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7739 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7740 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7741 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7742 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7743 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7744 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7745 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7746 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7747 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7748 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7749 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7750 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7751 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7752 ; AVX512F-NEXT: retq
7754 ; AVX512BW-LABEL: ugt_27_v16i32:
7755 ; AVX512BW: # %bb.0:
7756 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7757 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7758 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7759 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7760 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7761 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7762 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7763 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7764 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7765 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7766 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7767 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7768 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7769 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7770 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7771 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7772 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7773 ; AVX512BW-NEXT: retq
7775 ; AVX512VPOPCNTDQ-LABEL: ugt_27_v16i32:
7776 ; AVX512VPOPCNTDQ: # %bb.0:
7777 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7778 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7779 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7780 ; AVX512VPOPCNTDQ-NEXT: retq
7782 ; BITALG-LABEL: ugt_27_v16i32:
7784 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7785 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7786 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7787 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7788 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7789 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7790 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7791 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7792 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7794 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7795 %3 = icmp ugt <16 x i32> %2, <i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27>
7796 %4 = sext <16 x i1> %3 to <16 x i32>
7800 define <16 x i32> @ult_28_v16i32(<16 x i32> %0) {
7801 ; AVX512F-LABEL: ult_28_v16i32:
7803 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7804 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7805 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7806 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7807 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7808 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7809 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7810 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7811 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7812 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7813 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7814 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7815 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7816 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7817 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7818 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7819 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7820 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7821 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7822 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7823 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7824 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7825 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7826 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7827 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7828 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7829 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7830 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7831 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7832 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7833 ; AVX512F-NEXT: retq
7835 ; AVX512BW-LABEL: ult_28_v16i32:
7836 ; AVX512BW: # %bb.0:
7837 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7838 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7839 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7840 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7841 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7842 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7843 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7844 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7845 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7846 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7847 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7848 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7849 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7850 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7851 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7852 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7853 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7854 ; AVX512BW-NEXT: retq
7856 ; AVX512VPOPCNTDQ-LABEL: ult_28_v16i32:
7857 ; AVX512VPOPCNTDQ: # %bb.0:
7858 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7859 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7860 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7861 ; AVX512VPOPCNTDQ-NEXT: retq
7863 ; BITALG-LABEL: ult_28_v16i32:
7865 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7866 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7867 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7868 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7869 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7870 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7871 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7872 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7873 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7875 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7876 %3 = icmp ult <16 x i32> %2, <i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28>
7877 %4 = sext <16 x i1> %3 to <16 x i32>
7881 define <16 x i32> @ugt_28_v16i32(<16 x i32> %0) {
7882 ; AVX512F-LABEL: ugt_28_v16i32:
7884 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7885 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7886 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7887 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7888 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7889 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7890 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7891 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7892 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7893 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7894 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7895 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7896 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7897 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7898 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7899 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7900 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7901 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7902 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7903 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7904 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7905 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7906 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7907 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7908 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7909 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7910 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7911 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7912 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7913 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7914 ; AVX512F-NEXT: retq
7916 ; AVX512BW-LABEL: ugt_28_v16i32:
7917 ; AVX512BW: # %bb.0:
7918 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7919 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7920 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7921 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
7922 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7923 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7924 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7925 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7926 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7927 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7928 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7929 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7930 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7931 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7932 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7933 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7934 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7935 ; AVX512BW-NEXT: retq
7937 ; AVX512VPOPCNTDQ-LABEL: ugt_28_v16i32:
7938 ; AVX512VPOPCNTDQ: # %bb.0:
7939 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7940 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7941 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7942 ; AVX512VPOPCNTDQ-NEXT: retq
7944 ; BITALG-LABEL: ugt_28_v16i32:
7946 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7947 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7948 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7949 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7950 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7951 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7952 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7953 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7954 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7956 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7957 %3 = icmp ugt <16 x i32> %2, <i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28>
7958 %4 = sext <16 x i1> %3 to <16 x i32>
7962 define <16 x i32> @ult_29_v16i32(<16 x i32> %0) {
7963 ; AVX512F-LABEL: ult_29_v16i32:
7965 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7966 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7967 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7968 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7969 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
7970 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7971 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7972 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7973 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7974 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7975 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7976 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7977 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7978 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7979 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7980 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7981 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7982 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7983 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7984 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7985 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7986 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7987 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7988 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7989 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7990 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7991 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7992 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7993 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7994 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7995 ; AVX512F-NEXT: retq
7997 ; AVX512BW-LABEL: ult_29_v16i32:
7998 ; AVX512BW: # %bb.0:
7999 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8000 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8001 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8002 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8003 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8004 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8005 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8006 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8007 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8008 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8009 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8010 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8011 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8012 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8013 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8014 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8015 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8016 ; AVX512BW-NEXT: retq
8018 ; AVX512VPOPCNTDQ-LABEL: ult_29_v16i32:
8019 ; AVX512VPOPCNTDQ: # %bb.0:
8020 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8021 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8022 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8023 ; AVX512VPOPCNTDQ-NEXT: retq
8025 ; BITALG-LABEL: ult_29_v16i32:
8027 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8028 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8029 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8030 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8031 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8032 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8033 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8034 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8035 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8037 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
8038 %3 = icmp ult <16 x i32> %2, <i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29>
8039 %4 = sext <16 x i1> %3 to <16 x i32>
8043 define <16 x i32> @ugt_29_v16i32(<16 x i32> %0) {
8044 ; AVX512F-LABEL: ugt_29_v16i32:
8046 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8047 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8048 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8049 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8050 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8051 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8052 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8053 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8054 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8055 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8056 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8057 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
8058 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
8059 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
8060 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8061 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
8062 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8063 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8064 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8065 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8066 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8067 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8068 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
8069 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
8070 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
8071 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8072 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8073 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8074 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8075 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8076 ; AVX512F-NEXT: retq
8078 ; AVX512BW-LABEL: ugt_29_v16i32:
8079 ; AVX512BW: # %bb.0:
8080 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8081 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8082 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8083 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8084 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8085 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8086 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8087 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8088 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8089 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8090 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8091 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8092 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8093 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8094 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8095 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8096 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8097 ; AVX512BW-NEXT: retq
8099 ; AVX512VPOPCNTDQ-LABEL: ugt_29_v16i32:
8100 ; AVX512VPOPCNTDQ: # %bb.0:
8101 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8102 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8103 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8104 ; AVX512VPOPCNTDQ-NEXT: retq
8106 ; BITALG-LABEL: ugt_29_v16i32:
8108 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8109 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8110 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8111 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8112 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8113 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8114 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8115 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8116 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8118 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
8119 %3 = icmp ugt <16 x i32> %2, <i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29>
8120 %4 = sext <16 x i1> %3 to <16 x i32>
8124 define <16 x i32> @ult_30_v16i32(<16 x i32> %0) {
8125 ; AVX512F-LABEL: ult_30_v16i32:
8127 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8128 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8129 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8130 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8131 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8132 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8133 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8134 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8135 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8136 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8137 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8138 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
8139 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
8140 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
8141 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8142 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
8143 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8144 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8145 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8146 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8147 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8148 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8149 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
8150 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
8151 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
8152 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8153 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8154 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8155 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8156 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8157 ; AVX512F-NEXT: retq
8159 ; AVX512BW-LABEL: ult_30_v16i32:
8160 ; AVX512BW: # %bb.0:
8161 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8162 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8163 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8164 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8165 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8166 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8167 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8168 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8169 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8170 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8171 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8172 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8173 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8174 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8175 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8176 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8177 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8178 ; AVX512BW-NEXT: retq
8180 ; AVX512VPOPCNTDQ-LABEL: ult_30_v16i32:
8181 ; AVX512VPOPCNTDQ: # %bb.0:
8182 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8183 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8184 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8185 ; AVX512VPOPCNTDQ-NEXT: retq
8187 ; BITALG-LABEL: ult_30_v16i32:
8189 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8190 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8191 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8192 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8193 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8194 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8195 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8196 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8197 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8199 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
8200 %3 = icmp ult <16 x i32> %2, <i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30>
8201 %4 = sext <16 x i1> %3 to <16 x i32>
8205 define <16 x i32> @ugt_30_v16i32(<16 x i32> %0) {
8206 ; AVX512F-LABEL: ugt_30_v16i32:
8208 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8209 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8210 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8211 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8212 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8213 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8214 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8215 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8216 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8217 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8218 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8219 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
8220 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
8221 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
8222 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8223 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
8224 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8225 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8226 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8227 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8228 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8229 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8230 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
8231 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
8232 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
8233 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8234 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8235 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8236 ; AVX512F-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8237 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8238 ; AVX512F-NEXT: retq
8240 ; AVX512BW-LABEL: ugt_30_v16i32:
8241 ; AVX512BW: # %bb.0:
8242 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8243 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8244 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8245 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8246 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8247 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8248 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8249 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8250 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8251 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8252 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8253 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8254 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8255 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8256 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8257 ; AVX512BW-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8258 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8259 ; AVX512BW-NEXT: retq
8261 ; AVX512VPOPCNTDQ-LABEL: ugt_30_v16i32:
8262 ; AVX512VPOPCNTDQ: # %bb.0:
8263 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8264 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8265 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8266 ; AVX512VPOPCNTDQ-NEXT: retq
8268 ; BITALG-LABEL: ugt_30_v16i32:
8270 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8271 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8272 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8273 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8274 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8275 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8276 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8277 ; BITALG-NEXT: vpcmpgtd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8278 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8280 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
8281 %3 = icmp ugt <16 x i32> %2, <i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30>
8282 %4 = sext <16 x i1> %3 to <16 x i32>
8286 define <16 x i32> @ult_31_v16i32(<16 x i32> %0) {
8287 ; AVX512F-LABEL: ult_31_v16i32:
8289 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8290 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8291 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8292 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8293 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8294 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8295 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8296 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8297 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8298 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8299 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8300 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
8301 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
8302 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
8303 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8304 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
8305 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8306 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8307 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8308 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8309 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8310 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8311 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
8312 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
8313 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
8314 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8315 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8316 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8317 ; AVX512F-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8318 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8319 ; AVX512F-NEXT: retq
8321 ; AVX512BW-LABEL: ult_31_v16i32:
8322 ; AVX512BW: # %bb.0:
8323 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8324 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8325 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8326 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8327 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8328 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8329 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8330 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8331 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8332 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8333 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8334 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8335 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8336 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8337 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8338 ; AVX512BW-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8339 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8340 ; AVX512BW-NEXT: retq
8342 ; AVX512VPOPCNTDQ-LABEL: ult_31_v16i32:
8343 ; AVX512VPOPCNTDQ: # %bb.0:
8344 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8345 ; AVX512VPOPCNTDQ-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8346 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8347 ; AVX512VPOPCNTDQ-NEXT: retq
8349 ; BITALG-LABEL: ult_31_v16i32:
8351 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8352 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8353 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8354 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8355 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8356 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8357 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8358 ; BITALG-NEXT: vpcmpltd {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8359 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8361 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
8362 %3 = icmp ult <16 x i32> %2, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
8363 %4 = sext <16 x i1> %3 to <16 x i32>
8367 define <8 x i64> @ugt_1_v8i64(<8 x i64> %0) {
8368 ; AVX512F-LABEL: ugt_1_v8i64:
8370 ; AVX512F-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8371 ; AVX512F-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8372 ; AVX512F-NEXT: vptestmq %zmm1, %zmm0, %k1
8373 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8374 ; AVX512F-NEXT: retq
8376 ; AVX512BW-LABEL: ugt_1_v8i64:
8377 ; AVX512BW: # %bb.0:
8378 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8379 ; AVX512BW-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8380 ; AVX512BW-NEXT: vptestmq %zmm1, %zmm0, %k1
8381 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8382 ; AVX512BW-NEXT: retq
8384 ; AVX512VPOPCNTDQ-LABEL: ugt_1_v8i64:
8385 ; AVX512VPOPCNTDQ: # %bb.0:
8386 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8387 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8388 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8389 ; AVX512VPOPCNTDQ-NEXT: retq
8391 ; BITALG-LABEL: ugt_1_v8i64:
8393 ; BITALG-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8394 ; BITALG-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8395 ; BITALG-NEXT: vptestmq %zmm1, %zmm0, %k1
8396 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8398 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8399 %3 = icmp ugt <8 x i64> %2, <i64 1, i64 1, i64 1, i64 1, i64 1, i64 1, i64 1, i64 1>
8400 %4 = sext <8 x i1> %3 to <8 x i64>
8404 define <8 x i64> @ult_2_v8i64(<8 x i64> %0) {
8405 ; AVX512F-LABEL: ult_2_v8i64:
8407 ; AVX512F-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8408 ; AVX512F-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8409 ; AVX512F-NEXT: vptestnmq %zmm1, %zmm0, %k1
8410 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8411 ; AVX512F-NEXT: retq
8413 ; AVX512BW-LABEL: ult_2_v8i64:
8414 ; AVX512BW: # %bb.0:
8415 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8416 ; AVX512BW-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8417 ; AVX512BW-NEXT: vptestnmq %zmm1, %zmm0, %k1
8418 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8419 ; AVX512BW-NEXT: retq
8421 ; AVX512VPOPCNTDQ-LABEL: ult_2_v8i64:
8422 ; AVX512VPOPCNTDQ: # %bb.0:
8423 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8424 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8425 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8426 ; AVX512VPOPCNTDQ-NEXT: retq
8428 ; BITALG-LABEL: ult_2_v8i64:
8430 ; BITALG-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8431 ; BITALG-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8432 ; BITALG-NEXT: vptestnmq %zmm1, %zmm0, %k1
8433 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8435 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8436 %3 = icmp ult <8 x i64> %2, <i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2>
8437 %4 = sext <8 x i1> %3 to <8 x i64>
8441 define <8 x i64> @ugt_2_v8i64(<8 x i64> %0) {
8442 ; AVX512F-LABEL: ugt_2_v8i64:
8444 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8445 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8446 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8447 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8448 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8449 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8450 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8451 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8452 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8453 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8454 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8455 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8456 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8457 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8458 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8459 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8460 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8461 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8462 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8463 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8464 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8465 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8466 ; AVX512F-NEXT: retq
8468 ; AVX512BW-LABEL: ugt_2_v8i64:
8469 ; AVX512BW: # %bb.0:
8470 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8471 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8472 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8473 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8474 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8475 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8476 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8477 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8478 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8479 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8480 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8481 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8482 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8483 ; AVX512BW-NEXT: retq
8485 ; AVX512VPOPCNTDQ-LABEL: ugt_2_v8i64:
8486 ; AVX512VPOPCNTDQ: # %bb.0:
8487 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8488 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8489 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8490 ; AVX512VPOPCNTDQ-NEXT: retq
8492 ; BITALG-LABEL: ugt_2_v8i64:
8494 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8495 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8496 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8497 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8498 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8500 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8501 %3 = icmp ugt <8 x i64> %2, <i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2>
8502 %4 = sext <8 x i1> %3 to <8 x i64>
8506 define <8 x i64> @ult_3_v8i64(<8 x i64> %0) {
8507 ; AVX512F-LABEL: ult_3_v8i64:
8509 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8510 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8511 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8512 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8513 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8514 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8515 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8516 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8517 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8518 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8519 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8520 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8521 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8522 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8523 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8524 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8525 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8526 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8527 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8528 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8529 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8530 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8531 ; AVX512F-NEXT: retq
8533 ; AVX512BW-LABEL: ult_3_v8i64:
8534 ; AVX512BW: # %bb.0:
8535 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8536 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8537 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8538 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8539 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8540 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8541 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8542 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8543 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8544 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8545 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8546 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8547 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8548 ; AVX512BW-NEXT: retq
8550 ; AVX512VPOPCNTDQ-LABEL: ult_3_v8i64:
8551 ; AVX512VPOPCNTDQ: # %bb.0:
8552 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8553 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8554 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8555 ; AVX512VPOPCNTDQ-NEXT: retq
8557 ; BITALG-LABEL: ult_3_v8i64:
8559 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8560 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8561 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8562 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8563 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8565 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8566 %3 = icmp ult <8 x i64> %2, <i64 3, i64 3, i64 3, i64 3, i64 3, i64 3, i64 3, i64 3>
8567 %4 = sext <8 x i1> %3 to <8 x i64>
8571 define <8 x i64> @ugt_3_v8i64(<8 x i64> %0) {
8572 ; AVX512F-LABEL: ugt_3_v8i64:
8574 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8575 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8576 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8577 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8578 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8579 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8580 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8581 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8582 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8583 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8584 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8585 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8586 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8587 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8588 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8589 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8590 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8591 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8592 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8593 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8594 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8595 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8596 ; AVX512F-NEXT: retq
8598 ; AVX512BW-LABEL: ugt_3_v8i64:
8599 ; AVX512BW: # %bb.0:
8600 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8601 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8602 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8603 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8604 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8605 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8606 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8607 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8608 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8609 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8610 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8611 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8612 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8613 ; AVX512BW-NEXT: retq
8615 ; AVX512VPOPCNTDQ-LABEL: ugt_3_v8i64:
8616 ; AVX512VPOPCNTDQ: # %bb.0:
8617 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8618 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8619 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8620 ; AVX512VPOPCNTDQ-NEXT: retq
8622 ; BITALG-LABEL: ugt_3_v8i64:
8624 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8625 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8626 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8627 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8628 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8630 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8631 %3 = icmp ugt <8 x i64> %2, <i64 3, i64 3, i64 3, i64 3, i64 3, i64 3, i64 3, i64 3>
8632 %4 = sext <8 x i1> %3 to <8 x i64>
8636 define <8 x i64> @ult_4_v8i64(<8 x i64> %0) {
8637 ; AVX512F-LABEL: ult_4_v8i64:
8639 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8640 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8641 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8642 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8643 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8644 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8645 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8646 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8647 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8648 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8649 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8650 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8651 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8652 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8653 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8654 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8655 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8656 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8657 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8658 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8659 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8660 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8661 ; AVX512F-NEXT: retq
8663 ; AVX512BW-LABEL: ult_4_v8i64:
8664 ; AVX512BW: # %bb.0:
8665 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8666 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8667 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8668 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8669 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8670 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8671 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8672 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8673 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8674 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8675 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8676 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8677 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8678 ; AVX512BW-NEXT: retq
8680 ; AVX512VPOPCNTDQ-LABEL: ult_4_v8i64:
8681 ; AVX512VPOPCNTDQ: # %bb.0:
8682 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8683 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8684 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8685 ; AVX512VPOPCNTDQ-NEXT: retq
8687 ; BITALG-LABEL: ult_4_v8i64:
8689 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8690 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8691 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8692 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8693 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8695 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8696 %3 = icmp ult <8 x i64> %2, <i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4>
8697 %4 = sext <8 x i1> %3 to <8 x i64>
8701 define <8 x i64> @ugt_4_v8i64(<8 x i64> %0) {
8702 ; AVX512F-LABEL: ugt_4_v8i64:
8704 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8705 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8706 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8707 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8708 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8709 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8710 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8711 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8712 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8713 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8714 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8715 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8716 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8717 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8718 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8719 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8720 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8721 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8722 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8723 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8724 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8725 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8726 ; AVX512F-NEXT: retq
8728 ; AVX512BW-LABEL: ugt_4_v8i64:
8729 ; AVX512BW: # %bb.0:
8730 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8731 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8732 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8733 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8734 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8735 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8736 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8737 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8738 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8739 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8740 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8741 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8742 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8743 ; AVX512BW-NEXT: retq
8745 ; AVX512VPOPCNTDQ-LABEL: ugt_4_v8i64:
8746 ; AVX512VPOPCNTDQ: # %bb.0:
8747 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8748 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8749 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8750 ; AVX512VPOPCNTDQ-NEXT: retq
8752 ; BITALG-LABEL: ugt_4_v8i64:
8754 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8755 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8756 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8757 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8758 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8760 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8761 %3 = icmp ugt <8 x i64> %2, <i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4>
8762 %4 = sext <8 x i1> %3 to <8 x i64>
8766 define <8 x i64> @ult_5_v8i64(<8 x i64> %0) {
8767 ; AVX512F-LABEL: ult_5_v8i64:
8769 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8770 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8771 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8772 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8773 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8774 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8775 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8776 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8777 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8778 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8779 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8780 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8781 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8782 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8783 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8784 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8785 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8786 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8787 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8788 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8789 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8790 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8791 ; AVX512F-NEXT: retq
8793 ; AVX512BW-LABEL: ult_5_v8i64:
8794 ; AVX512BW: # %bb.0:
8795 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8796 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8797 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8798 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8799 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8800 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8801 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8802 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8803 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8804 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8805 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8806 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8807 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8808 ; AVX512BW-NEXT: retq
8810 ; AVX512VPOPCNTDQ-LABEL: ult_5_v8i64:
8811 ; AVX512VPOPCNTDQ: # %bb.0:
8812 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8813 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8814 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8815 ; AVX512VPOPCNTDQ-NEXT: retq
8817 ; BITALG-LABEL: ult_5_v8i64:
8819 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8820 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8821 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8822 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8823 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8825 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8826 %3 = icmp ult <8 x i64> %2, <i64 5, i64 5, i64 5, i64 5, i64 5, i64 5, i64 5, i64 5>
8827 %4 = sext <8 x i1> %3 to <8 x i64>
8831 define <8 x i64> @ugt_5_v8i64(<8 x i64> %0) {
8832 ; AVX512F-LABEL: ugt_5_v8i64:
8834 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8835 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8836 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8837 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8838 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8839 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8840 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8841 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8842 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8843 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8844 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8845 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8846 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8847 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8848 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8849 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8850 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8851 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8852 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8853 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8854 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8855 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8856 ; AVX512F-NEXT: retq
8858 ; AVX512BW-LABEL: ugt_5_v8i64:
8859 ; AVX512BW: # %bb.0:
8860 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8861 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8862 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8863 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8864 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8865 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8866 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8867 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8868 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8869 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8870 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8871 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8872 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8873 ; AVX512BW-NEXT: retq
8875 ; AVX512VPOPCNTDQ-LABEL: ugt_5_v8i64:
8876 ; AVX512VPOPCNTDQ: # %bb.0:
8877 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8878 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8879 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8880 ; AVX512VPOPCNTDQ-NEXT: retq
8882 ; BITALG-LABEL: ugt_5_v8i64:
8884 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8885 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8886 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8887 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8888 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8890 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8891 %3 = icmp ugt <8 x i64> %2, <i64 5, i64 5, i64 5, i64 5, i64 5, i64 5, i64 5, i64 5>
8892 %4 = sext <8 x i1> %3 to <8 x i64>
8896 define <8 x i64> @ult_6_v8i64(<8 x i64> %0) {
8897 ; AVX512F-LABEL: ult_6_v8i64:
8899 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8900 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8901 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8902 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8903 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8904 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8905 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8906 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8907 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8908 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8909 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8910 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8911 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8912 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8913 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8914 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8915 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8916 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8917 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8918 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8919 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8920 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8921 ; AVX512F-NEXT: retq
8923 ; AVX512BW-LABEL: ult_6_v8i64:
8924 ; AVX512BW: # %bb.0:
8925 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8926 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8927 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8928 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8929 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8930 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8931 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8932 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8933 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8934 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8935 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8936 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8937 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8938 ; AVX512BW-NEXT: retq
8940 ; AVX512VPOPCNTDQ-LABEL: ult_6_v8i64:
8941 ; AVX512VPOPCNTDQ: # %bb.0:
8942 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8943 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8944 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8945 ; AVX512VPOPCNTDQ-NEXT: retq
8947 ; BITALG-LABEL: ult_6_v8i64:
8949 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8950 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8951 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8952 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8953 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8955 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8956 %3 = icmp ult <8 x i64> %2, <i64 6, i64 6, i64 6, i64 6, i64 6, i64 6, i64 6, i64 6>
8957 %4 = sext <8 x i1> %3 to <8 x i64>
8961 define <8 x i64> @ugt_6_v8i64(<8 x i64> %0) {
8962 ; AVX512F-LABEL: ugt_6_v8i64:
8964 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8965 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8966 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8967 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8968 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
8969 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8970 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8971 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8972 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8973 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8974 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8975 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8976 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8977 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8978 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8979 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8980 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8981 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8982 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8983 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8984 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8985 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8986 ; AVX512F-NEXT: retq
8988 ; AVX512BW-LABEL: ugt_6_v8i64:
8989 ; AVX512BW: # %bb.0:
8990 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8991 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8992 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8993 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
8994 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8995 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8996 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8997 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8998 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8999 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9000 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9001 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9002 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9003 ; AVX512BW-NEXT: retq
9005 ; AVX512VPOPCNTDQ-LABEL: ugt_6_v8i64:
9006 ; AVX512VPOPCNTDQ: # %bb.0:
9007 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9008 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9009 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9010 ; AVX512VPOPCNTDQ-NEXT: retq
9012 ; BITALG-LABEL: ugt_6_v8i64:
9014 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9015 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9016 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9017 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9018 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9020 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9021 %3 = icmp ugt <8 x i64> %2, <i64 6, i64 6, i64 6, i64 6, i64 6, i64 6, i64 6, i64 6>
9022 %4 = sext <8 x i1> %3 to <8 x i64>
9026 define <8 x i64> @ult_7_v8i64(<8 x i64> %0) {
9027 ; AVX512F-LABEL: ult_7_v8i64:
9029 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9030 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9031 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9032 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9033 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9034 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9035 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9036 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9037 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9038 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9039 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9040 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9041 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9042 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9043 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9044 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9045 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9046 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9047 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9048 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9049 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9050 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9051 ; AVX512F-NEXT: retq
9053 ; AVX512BW-LABEL: ult_7_v8i64:
9054 ; AVX512BW: # %bb.0:
9055 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9056 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9057 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9058 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9059 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9060 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9061 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9062 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9063 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9064 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9065 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9066 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9067 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9068 ; AVX512BW-NEXT: retq
9070 ; AVX512VPOPCNTDQ-LABEL: ult_7_v8i64:
9071 ; AVX512VPOPCNTDQ: # %bb.0:
9072 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9073 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9074 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9075 ; AVX512VPOPCNTDQ-NEXT: retq
9077 ; BITALG-LABEL: ult_7_v8i64:
9079 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9080 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9081 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9082 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9083 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9085 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9086 %3 = icmp ult <8 x i64> %2, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
9087 %4 = sext <8 x i1> %3 to <8 x i64>
9091 define <8 x i64> @ugt_7_v8i64(<8 x i64> %0) {
9092 ; AVX512F-LABEL: ugt_7_v8i64:
9094 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9095 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9096 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9097 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9098 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9099 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9100 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9101 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9102 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9103 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9104 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9105 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9106 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9107 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9108 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9109 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9110 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9111 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9112 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9113 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9114 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9115 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9116 ; AVX512F-NEXT: retq
9118 ; AVX512BW-LABEL: ugt_7_v8i64:
9119 ; AVX512BW: # %bb.0:
9120 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9121 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9122 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9123 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9124 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9125 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9126 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9127 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9128 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9129 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9130 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9131 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9132 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9133 ; AVX512BW-NEXT: retq
9135 ; AVX512VPOPCNTDQ-LABEL: ugt_7_v8i64:
9136 ; AVX512VPOPCNTDQ: # %bb.0:
9137 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9138 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9139 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9140 ; AVX512VPOPCNTDQ-NEXT: retq
9142 ; BITALG-LABEL: ugt_7_v8i64:
9144 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9145 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9146 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9147 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9148 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9150 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9151 %3 = icmp ugt <8 x i64> %2, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
9152 %4 = sext <8 x i1> %3 to <8 x i64>
9156 define <8 x i64> @ult_8_v8i64(<8 x i64> %0) {
9157 ; AVX512F-LABEL: ult_8_v8i64:
9159 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9160 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9161 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9162 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9163 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9164 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9165 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9166 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9167 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9168 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9169 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9170 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9171 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9172 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9173 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9174 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9175 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9176 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9177 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9178 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9179 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9180 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9181 ; AVX512F-NEXT: retq
9183 ; AVX512BW-LABEL: ult_8_v8i64:
9184 ; AVX512BW: # %bb.0:
9185 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9186 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9187 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9188 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9189 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9190 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9191 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9192 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9193 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9194 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9195 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9196 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9197 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9198 ; AVX512BW-NEXT: retq
9200 ; AVX512VPOPCNTDQ-LABEL: ult_8_v8i64:
9201 ; AVX512VPOPCNTDQ: # %bb.0:
9202 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9203 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9204 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9205 ; AVX512VPOPCNTDQ-NEXT: retq
9207 ; BITALG-LABEL: ult_8_v8i64:
9209 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9210 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9211 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9212 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9213 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9215 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9216 %3 = icmp ult <8 x i64> %2, <i64 8, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8>
9217 %4 = sext <8 x i1> %3 to <8 x i64>
9221 define <8 x i64> @ugt_8_v8i64(<8 x i64> %0) {
9222 ; AVX512F-LABEL: ugt_8_v8i64:
9224 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9225 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9226 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9227 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9228 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9229 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9230 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9231 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9232 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9233 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9234 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9235 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9236 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9237 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9238 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9239 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9240 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9241 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9242 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9243 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9244 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9245 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9246 ; AVX512F-NEXT: retq
9248 ; AVX512BW-LABEL: ugt_8_v8i64:
9249 ; AVX512BW: # %bb.0:
9250 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9251 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9252 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9253 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9254 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9255 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9256 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9257 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9258 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9259 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9260 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9261 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9262 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9263 ; AVX512BW-NEXT: retq
9265 ; AVX512VPOPCNTDQ-LABEL: ugt_8_v8i64:
9266 ; AVX512VPOPCNTDQ: # %bb.0:
9267 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9268 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9269 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9270 ; AVX512VPOPCNTDQ-NEXT: retq
9272 ; BITALG-LABEL: ugt_8_v8i64:
9274 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9275 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9276 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9277 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9278 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9280 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9281 %3 = icmp ugt <8 x i64> %2, <i64 8, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8>
9282 %4 = sext <8 x i1> %3 to <8 x i64>
9286 define <8 x i64> @ult_9_v8i64(<8 x i64> %0) {
9287 ; AVX512F-LABEL: ult_9_v8i64:
9289 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9290 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9291 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9292 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9293 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9294 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9295 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9296 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9297 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9298 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9299 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9300 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9301 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9302 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9303 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9304 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9305 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9306 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9307 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9308 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9309 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9310 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9311 ; AVX512F-NEXT: retq
9313 ; AVX512BW-LABEL: ult_9_v8i64:
9314 ; AVX512BW: # %bb.0:
9315 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9316 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9317 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9318 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9319 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9320 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9321 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9322 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9323 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9324 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9325 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9326 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9327 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9328 ; AVX512BW-NEXT: retq
9330 ; AVX512VPOPCNTDQ-LABEL: ult_9_v8i64:
9331 ; AVX512VPOPCNTDQ: # %bb.0:
9332 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9333 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9334 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9335 ; AVX512VPOPCNTDQ-NEXT: retq
9337 ; BITALG-LABEL: ult_9_v8i64:
9339 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9340 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9341 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9342 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9343 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9345 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9346 %3 = icmp ult <8 x i64> %2, <i64 9, i64 9, i64 9, i64 9, i64 9, i64 9, i64 9, i64 9>
9347 %4 = sext <8 x i1> %3 to <8 x i64>
9351 define <8 x i64> @ugt_9_v8i64(<8 x i64> %0) {
9352 ; AVX512F-LABEL: ugt_9_v8i64:
9354 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9355 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9356 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9357 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9358 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9359 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9360 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9361 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9362 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9363 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9364 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9365 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9366 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9367 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9368 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9369 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9370 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9371 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9372 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9373 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9374 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9375 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9376 ; AVX512F-NEXT: retq
9378 ; AVX512BW-LABEL: ugt_9_v8i64:
9379 ; AVX512BW: # %bb.0:
9380 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9381 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9382 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9383 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9384 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9385 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9386 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9387 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9388 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9389 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9390 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9391 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9392 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9393 ; AVX512BW-NEXT: retq
9395 ; AVX512VPOPCNTDQ-LABEL: ugt_9_v8i64:
9396 ; AVX512VPOPCNTDQ: # %bb.0:
9397 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9398 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9399 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9400 ; AVX512VPOPCNTDQ-NEXT: retq
9402 ; BITALG-LABEL: ugt_9_v8i64:
9404 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9405 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9406 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9407 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9408 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9410 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9411 %3 = icmp ugt <8 x i64> %2, <i64 9, i64 9, i64 9, i64 9, i64 9, i64 9, i64 9, i64 9>
9412 %4 = sext <8 x i1> %3 to <8 x i64>
9416 define <8 x i64> @ult_10_v8i64(<8 x i64> %0) {
9417 ; AVX512F-LABEL: ult_10_v8i64:
9419 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9420 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9421 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9422 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9423 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9424 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9425 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9426 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9427 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9428 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9429 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9430 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9431 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9432 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9433 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9434 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9435 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9436 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9437 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9438 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9439 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9440 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9441 ; AVX512F-NEXT: retq
9443 ; AVX512BW-LABEL: ult_10_v8i64:
9444 ; AVX512BW: # %bb.0:
9445 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9446 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9447 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9448 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9449 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9450 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9451 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9452 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9453 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9454 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9455 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9456 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9457 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9458 ; AVX512BW-NEXT: retq
9460 ; AVX512VPOPCNTDQ-LABEL: ult_10_v8i64:
9461 ; AVX512VPOPCNTDQ: # %bb.0:
9462 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9463 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9464 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9465 ; AVX512VPOPCNTDQ-NEXT: retq
9467 ; BITALG-LABEL: ult_10_v8i64:
9469 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9470 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9471 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9472 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9473 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9475 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9476 %3 = icmp ult <8 x i64> %2, <i64 10, i64 10, i64 10, i64 10, i64 10, i64 10, i64 10, i64 10>
9477 %4 = sext <8 x i1> %3 to <8 x i64>
9481 define <8 x i64> @ugt_10_v8i64(<8 x i64> %0) {
9482 ; AVX512F-LABEL: ugt_10_v8i64:
9484 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9485 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9486 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9487 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9488 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9489 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9490 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9491 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9492 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9493 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9494 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9495 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9496 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9497 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9498 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9499 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9500 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9501 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9502 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9503 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9504 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9505 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9506 ; AVX512F-NEXT: retq
9508 ; AVX512BW-LABEL: ugt_10_v8i64:
9509 ; AVX512BW: # %bb.0:
9510 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9511 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9512 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9513 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9514 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9515 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9516 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9517 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9518 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9519 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9520 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9521 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9522 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9523 ; AVX512BW-NEXT: retq
9525 ; AVX512VPOPCNTDQ-LABEL: ugt_10_v8i64:
9526 ; AVX512VPOPCNTDQ: # %bb.0:
9527 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9528 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9529 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9530 ; AVX512VPOPCNTDQ-NEXT: retq
9532 ; BITALG-LABEL: ugt_10_v8i64:
9534 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9535 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9536 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9537 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9538 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9540 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9541 %3 = icmp ugt <8 x i64> %2, <i64 10, i64 10, i64 10, i64 10, i64 10, i64 10, i64 10, i64 10>
9542 %4 = sext <8 x i1> %3 to <8 x i64>
9546 define <8 x i64> @ult_11_v8i64(<8 x i64> %0) {
9547 ; AVX512F-LABEL: ult_11_v8i64:
9549 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9550 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9551 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9552 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9553 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9554 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9555 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9556 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9557 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9558 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9559 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9560 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9561 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9562 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9563 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9564 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9565 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9566 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9567 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9568 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9569 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9570 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9571 ; AVX512F-NEXT: retq
9573 ; AVX512BW-LABEL: ult_11_v8i64:
9574 ; AVX512BW: # %bb.0:
9575 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9576 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9577 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9578 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9579 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9580 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9581 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9582 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9583 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9584 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9585 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9586 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9587 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9588 ; AVX512BW-NEXT: retq
9590 ; AVX512VPOPCNTDQ-LABEL: ult_11_v8i64:
9591 ; AVX512VPOPCNTDQ: # %bb.0:
9592 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9593 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9594 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9595 ; AVX512VPOPCNTDQ-NEXT: retq
9597 ; BITALG-LABEL: ult_11_v8i64:
9599 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9600 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9601 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9602 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9603 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9605 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9606 %3 = icmp ult <8 x i64> %2, <i64 11, i64 11, i64 11, i64 11, i64 11, i64 11, i64 11, i64 11>
9607 %4 = sext <8 x i1> %3 to <8 x i64>
9611 define <8 x i64> @ugt_11_v8i64(<8 x i64> %0) {
9612 ; AVX512F-LABEL: ugt_11_v8i64:
9614 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9615 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9616 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9617 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9618 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9619 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9620 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9621 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9622 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9623 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9624 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9625 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9626 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9627 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9628 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9629 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9630 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9631 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9632 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9633 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9634 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9635 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9636 ; AVX512F-NEXT: retq
9638 ; AVX512BW-LABEL: ugt_11_v8i64:
9639 ; AVX512BW: # %bb.0:
9640 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9641 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9642 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9643 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9644 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9645 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9646 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9647 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9648 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9649 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9650 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9651 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9652 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9653 ; AVX512BW-NEXT: retq
9655 ; AVX512VPOPCNTDQ-LABEL: ugt_11_v8i64:
9656 ; AVX512VPOPCNTDQ: # %bb.0:
9657 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9658 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9659 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9660 ; AVX512VPOPCNTDQ-NEXT: retq
9662 ; BITALG-LABEL: ugt_11_v8i64:
9664 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9665 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9666 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9667 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9668 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9670 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9671 %3 = icmp ugt <8 x i64> %2, <i64 11, i64 11, i64 11, i64 11, i64 11, i64 11, i64 11, i64 11>
9672 %4 = sext <8 x i1> %3 to <8 x i64>
9676 define <8 x i64> @ult_12_v8i64(<8 x i64> %0) {
9677 ; AVX512F-LABEL: ult_12_v8i64:
9679 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9680 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9681 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9682 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9683 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9684 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9685 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9686 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9687 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9688 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9689 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9690 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9691 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9692 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9693 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9694 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9695 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9696 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9697 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9698 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9699 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9700 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9701 ; AVX512F-NEXT: retq
9703 ; AVX512BW-LABEL: ult_12_v8i64:
9704 ; AVX512BW: # %bb.0:
9705 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9706 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9707 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9708 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9709 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9710 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9711 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9712 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9713 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9714 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9715 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9716 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9717 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9718 ; AVX512BW-NEXT: retq
9720 ; AVX512VPOPCNTDQ-LABEL: ult_12_v8i64:
9721 ; AVX512VPOPCNTDQ: # %bb.0:
9722 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9723 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9724 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9725 ; AVX512VPOPCNTDQ-NEXT: retq
9727 ; BITALG-LABEL: ult_12_v8i64:
9729 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9730 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9731 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9732 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9733 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9735 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9736 %3 = icmp ult <8 x i64> %2, <i64 12, i64 12, i64 12, i64 12, i64 12, i64 12, i64 12, i64 12>
9737 %4 = sext <8 x i1> %3 to <8 x i64>
9741 define <8 x i64> @ugt_12_v8i64(<8 x i64> %0) {
9742 ; AVX512F-LABEL: ugt_12_v8i64:
9744 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9745 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9746 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9747 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9748 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9749 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9750 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9751 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9752 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9753 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9754 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9755 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9756 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9757 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9758 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9759 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9760 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9761 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9762 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9763 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9764 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9765 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9766 ; AVX512F-NEXT: retq
9768 ; AVX512BW-LABEL: ugt_12_v8i64:
9769 ; AVX512BW: # %bb.0:
9770 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9771 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9772 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9773 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9774 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9775 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9776 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9777 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9778 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9779 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9780 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9781 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9782 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9783 ; AVX512BW-NEXT: retq
9785 ; AVX512VPOPCNTDQ-LABEL: ugt_12_v8i64:
9786 ; AVX512VPOPCNTDQ: # %bb.0:
9787 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9788 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9789 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9790 ; AVX512VPOPCNTDQ-NEXT: retq
9792 ; BITALG-LABEL: ugt_12_v8i64:
9794 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9795 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9796 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9797 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9798 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9800 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9801 %3 = icmp ugt <8 x i64> %2, <i64 12, i64 12, i64 12, i64 12, i64 12, i64 12, i64 12, i64 12>
9802 %4 = sext <8 x i1> %3 to <8 x i64>
9806 define <8 x i64> @ult_13_v8i64(<8 x i64> %0) {
9807 ; AVX512F-LABEL: ult_13_v8i64:
9809 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9810 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9811 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9812 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9813 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9814 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9815 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9816 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9817 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9818 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9819 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9820 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9821 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9822 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9823 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9824 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9825 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9826 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9827 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9828 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9829 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9830 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9831 ; AVX512F-NEXT: retq
9833 ; AVX512BW-LABEL: ult_13_v8i64:
9834 ; AVX512BW: # %bb.0:
9835 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9836 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9837 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9838 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9839 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9840 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9841 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9842 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9843 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9844 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9845 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9846 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9847 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9848 ; AVX512BW-NEXT: retq
9850 ; AVX512VPOPCNTDQ-LABEL: ult_13_v8i64:
9851 ; AVX512VPOPCNTDQ: # %bb.0:
9852 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9853 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9854 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9855 ; AVX512VPOPCNTDQ-NEXT: retq
9857 ; BITALG-LABEL: ult_13_v8i64:
9859 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9860 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9861 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9862 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9863 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9865 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9866 %3 = icmp ult <8 x i64> %2, <i64 13, i64 13, i64 13, i64 13, i64 13, i64 13, i64 13, i64 13>
9867 %4 = sext <8 x i1> %3 to <8 x i64>
9871 define <8 x i64> @ugt_13_v8i64(<8 x i64> %0) {
9872 ; AVX512F-LABEL: ugt_13_v8i64:
9874 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9875 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9876 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9877 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9878 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9879 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9880 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9881 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9882 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9883 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9884 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9885 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9886 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9887 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9888 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9889 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9890 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9891 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9892 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9893 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9894 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9895 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9896 ; AVX512F-NEXT: retq
9898 ; AVX512BW-LABEL: ugt_13_v8i64:
9899 ; AVX512BW: # %bb.0:
9900 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9901 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9902 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9903 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9904 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9905 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9906 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9907 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9908 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9909 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9910 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9911 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9912 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9913 ; AVX512BW-NEXT: retq
9915 ; AVX512VPOPCNTDQ-LABEL: ugt_13_v8i64:
9916 ; AVX512VPOPCNTDQ: # %bb.0:
9917 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9918 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9919 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9920 ; AVX512VPOPCNTDQ-NEXT: retq
9922 ; BITALG-LABEL: ugt_13_v8i64:
9924 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9925 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9926 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9927 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9928 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9930 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9931 %3 = icmp ugt <8 x i64> %2, <i64 13, i64 13, i64 13, i64 13, i64 13, i64 13, i64 13, i64 13>
9932 %4 = sext <8 x i1> %3 to <8 x i64>
9936 define <8 x i64> @ult_14_v8i64(<8 x i64> %0) {
9937 ; AVX512F-LABEL: ult_14_v8i64:
9939 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9940 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9941 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9942 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9943 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
9944 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9945 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9946 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9947 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9948 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9949 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9950 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9951 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9952 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9953 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9954 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9955 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9956 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9957 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9958 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9959 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9960 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9961 ; AVX512F-NEXT: retq
9963 ; AVX512BW-LABEL: ult_14_v8i64:
9964 ; AVX512BW: # %bb.0:
9965 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9966 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9967 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9968 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
9969 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9970 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9971 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9972 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9973 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9974 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9975 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9976 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9977 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9978 ; AVX512BW-NEXT: retq
9980 ; AVX512VPOPCNTDQ-LABEL: ult_14_v8i64:
9981 ; AVX512VPOPCNTDQ: # %bb.0:
9982 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9983 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9984 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9985 ; AVX512VPOPCNTDQ-NEXT: retq
9987 ; BITALG-LABEL: ult_14_v8i64:
9989 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9990 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9991 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9992 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9993 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9995 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9996 %3 = icmp ult <8 x i64> %2, <i64 14, i64 14, i64 14, i64 14, i64 14, i64 14, i64 14, i64 14>
9997 %4 = sext <8 x i1> %3 to <8 x i64>
10001 define <8 x i64> @ugt_14_v8i64(<8 x i64> %0) {
10002 ; AVX512F-LABEL: ugt_14_v8i64:
10003 ; AVX512F: # %bb.0:
10004 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10005 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10006 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10007 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10008 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10009 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10010 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10011 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10012 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10013 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10014 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10015 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10016 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10017 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10018 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10019 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10020 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10021 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10022 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10023 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10024 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10025 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10026 ; AVX512F-NEXT: retq
10028 ; AVX512BW-LABEL: ugt_14_v8i64:
10029 ; AVX512BW: # %bb.0:
10030 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10031 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10032 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10033 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10034 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10035 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10036 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10037 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10038 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10039 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10040 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10041 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10042 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10043 ; AVX512BW-NEXT: retq
10045 ; AVX512VPOPCNTDQ-LABEL: ugt_14_v8i64:
10046 ; AVX512VPOPCNTDQ: # %bb.0:
10047 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10048 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10049 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10050 ; AVX512VPOPCNTDQ-NEXT: retq
10052 ; BITALG-LABEL: ugt_14_v8i64:
10054 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10055 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10056 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10057 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10058 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10059 ; BITALG-NEXT: retq
10060 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10061 %3 = icmp ugt <8 x i64> %2, <i64 14, i64 14, i64 14, i64 14, i64 14, i64 14, i64 14, i64 14>
10062 %4 = sext <8 x i1> %3 to <8 x i64>
10066 define <8 x i64> @ult_15_v8i64(<8 x i64> %0) {
10067 ; AVX512F-LABEL: ult_15_v8i64:
10068 ; AVX512F: # %bb.0:
10069 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10070 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10071 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10072 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10073 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10074 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10075 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10076 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10077 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10078 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10079 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10080 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10081 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10082 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10083 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10084 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10085 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10086 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10087 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10088 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10089 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10090 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10091 ; AVX512F-NEXT: retq
10093 ; AVX512BW-LABEL: ult_15_v8i64:
10094 ; AVX512BW: # %bb.0:
10095 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10096 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10097 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10098 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10099 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10100 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10101 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10102 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10103 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10104 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10105 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10106 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10107 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10108 ; AVX512BW-NEXT: retq
10110 ; AVX512VPOPCNTDQ-LABEL: ult_15_v8i64:
10111 ; AVX512VPOPCNTDQ: # %bb.0:
10112 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10113 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10114 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10115 ; AVX512VPOPCNTDQ-NEXT: retq
10117 ; BITALG-LABEL: ult_15_v8i64:
10119 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10120 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10121 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10122 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10123 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10124 ; BITALG-NEXT: retq
10125 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10126 %3 = icmp ult <8 x i64> %2, <i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15>
10127 %4 = sext <8 x i1> %3 to <8 x i64>
10131 define <8 x i64> @ugt_15_v8i64(<8 x i64> %0) {
10132 ; AVX512F-LABEL: ugt_15_v8i64:
10133 ; AVX512F: # %bb.0:
10134 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10135 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10136 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10137 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10138 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10139 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10140 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10141 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10142 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10143 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10144 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10145 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10146 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10147 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10148 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10149 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10150 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10151 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10152 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10153 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10154 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10155 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10156 ; AVX512F-NEXT: retq
10158 ; AVX512BW-LABEL: ugt_15_v8i64:
10159 ; AVX512BW: # %bb.0:
10160 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10161 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10162 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10163 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10164 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10165 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10166 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10167 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10168 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10169 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10170 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10171 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10172 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10173 ; AVX512BW-NEXT: retq
10175 ; AVX512VPOPCNTDQ-LABEL: ugt_15_v8i64:
10176 ; AVX512VPOPCNTDQ: # %bb.0:
10177 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10178 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10179 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10180 ; AVX512VPOPCNTDQ-NEXT: retq
10182 ; BITALG-LABEL: ugt_15_v8i64:
10184 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10185 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10186 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10187 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10188 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10189 ; BITALG-NEXT: retq
10190 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10191 %3 = icmp ugt <8 x i64> %2, <i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15>
10192 %4 = sext <8 x i1> %3 to <8 x i64>
10196 define <8 x i64> @ult_16_v8i64(<8 x i64> %0) {
10197 ; AVX512F-LABEL: ult_16_v8i64:
10198 ; AVX512F: # %bb.0:
10199 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10200 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10201 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10202 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10203 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10204 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10205 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10206 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10207 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10208 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10209 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10210 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10211 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10212 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10213 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10214 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10215 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10216 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10217 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10218 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10219 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10220 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10221 ; AVX512F-NEXT: retq
10223 ; AVX512BW-LABEL: ult_16_v8i64:
10224 ; AVX512BW: # %bb.0:
10225 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10226 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10227 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10228 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10229 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10230 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10231 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10232 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10233 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10234 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10235 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10236 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10237 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10238 ; AVX512BW-NEXT: retq
10240 ; AVX512VPOPCNTDQ-LABEL: ult_16_v8i64:
10241 ; AVX512VPOPCNTDQ: # %bb.0:
10242 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10243 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10244 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10245 ; AVX512VPOPCNTDQ-NEXT: retq
10247 ; BITALG-LABEL: ult_16_v8i64:
10249 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10250 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10251 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10252 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10253 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10254 ; BITALG-NEXT: retq
10255 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10256 %3 = icmp ult <8 x i64> %2, <i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16>
10257 %4 = sext <8 x i1> %3 to <8 x i64>
10261 define <8 x i64> @ugt_16_v8i64(<8 x i64> %0) {
10262 ; AVX512F-LABEL: ugt_16_v8i64:
10263 ; AVX512F: # %bb.0:
10264 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10265 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10266 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10267 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10268 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10269 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10270 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10271 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10272 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10273 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10274 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10275 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10276 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10277 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10278 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10279 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10280 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10281 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10282 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10283 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10284 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10285 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10286 ; AVX512F-NEXT: retq
10288 ; AVX512BW-LABEL: ugt_16_v8i64:
10289 ; AVX512BW: # %bb.0:
10290 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10291 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10292 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10293 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10294 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10295 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10296 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10297 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10298 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10299 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10300 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10301 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10302 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10303 ; AVX512BW-NEXT: retq
10305 ; AVX512VPOPCNTDQ-LABEL: ugt_16_v8i64:
10306 ; AVX512VPOPCNTDQ: # %bb.0:
10307 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10308 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10309 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10310 ; AVX512VPOPCNTDQ-NEXT: retq
10312 ; BITALG-LABEL: ugt_16_v8i64:
10314 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10315 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10316 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10317 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10318 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10319 ; BITALG-NEXT: retq
10320 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10321 %3 = icmp ugt <8 x i64> %2, <i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16>
10322 %4 = sext <8 x i1> %3 to <8 x i64>
10326 define <8 x i64> @ult_17_v8i64(<8 x i64> %0) {
10327 ; AVX512F-LABEL: ult_17_v8i64:
10328 ; AVX512F: # %bb.0:
10329 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10330 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10331 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10332 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10333 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10334 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10335 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10336 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10337 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10338 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10339 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10340 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10341 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10342 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10343 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10344 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10345 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10346 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10347 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10348 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10349 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10350 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10351 ; AVX512F-NEXT: retq
10353 ; AVX512BW-LABEL: ult_17_v8i64:
10354 ; AVX512BW: # %bb.0:
10355 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10356 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10357 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10358 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10359 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10360 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10361 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10362 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10363 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10364 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10365 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10366 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10367 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10368 ; AVX512BW-NEXT: retq
10370 ; AVX512VPOPCNTDQ-LABEL: ult_17_v8i64:
10371 ; AVX512VPOPCNTDQ: # %bb.0:
10372 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10373 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10374 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10375 ; AVX512VPOPCNTDQ-NEXT: retq
10377 ; BITALG-LABEL: ult_17_v8i64:
10379 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10380 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10381 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10382 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10383 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10384 ; BITALG-NEXT: retq
10385 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10386 %3 = icmp ult <8 x i64> %2, <i64 17, i64 17, i64 17, i64 17, i64 17, i64 17, i64 17, i64 17>
10387 %4 = sext <8 x i1> %3 to <8 x i64>
10391 define <8 x i64> @ugt_17_v8i64(<8 x i64> %0) {
10392 ; AVX512F-LABEL: ugt_17_v8i64:
10393 ; AVX512F: # %bb.0:
10394 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10395 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10396 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10397 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10398 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10399 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10400 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10401 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10402 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10403 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10404 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10405 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10406 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10407 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10408 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10409 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10410 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10411 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10412 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10413 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10414 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10415 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10416 ; AVX512F-NEXT: retq
10418 ; AVX512BW-LABEL: ugt_17_v8i64:
10419 ; AVX512BW: # %bb.0:
10420 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10421 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10422 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10423 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10424 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10425 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10426 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10427 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10428 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10429 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10430 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10431 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10432 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10433 ; AVX512BW-NEXT: retq
10435 ; AVX512VPOPCNTDQ-LABEL: ugt_17_v8i64:
10436 ; AVX512VPOPCNTDQ: # %bb.0:
10437 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10438 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10439 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10440 ; AVX512VPOPCNTDQ-NEXT: retq
10442 ; BITALG-LABEL: ugt_17_v8i64:
10444 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10445 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10446 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10447 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10448 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10449 ; BITALG-NEXT: retq
10450 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10451 %3 = icmp ugt <8 x i64> %2, <i64 17, i64 17, i64 17, i64 17, i64 17, i64 17, i64 17, i64 17>
10452 %4 = sext <8 x i1> %3 to <8 x i64>
10456 define <8 x i64> @ult_18_v8i64(<8 x i64> %0) {
10457 ; AVX512F-LABEL: ult_18_v8i64:
10458 ; AVX512F: # %bb.0:
10459 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10460 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10461 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10462 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10463 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10464 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10465 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10466 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10467 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10468 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10469 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10470 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10471 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10472 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10473 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10474 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10475 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10476 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10477 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10478 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10479 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10480 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10481 ; AVX512F-NEXT: retq
10483 ; AVX512BW-LABEL: ult_18_v8i64:
10484 ; AVX512BW: # %bb.0:
10485 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10486 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10487 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10488 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10489 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10490 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10491 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10492 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10493 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10494 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10495 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10496 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10497 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10498 ; AVX512BW-NEXT: retq
10500 ; AVX512VPOPCNTDQ-LABEL: ult_18_v8i64:
10501 ; AVX512VPOPCNTDQ: # %bb.0:
10502 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10503 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10504 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10505 ; AVX512VPOPCNTDQ-NEXT: retq
10507 ; BITALG-LABEL: ult_18_v8i64:
10509 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10510 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10511 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10512 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10513 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10514 ; BITALG-NEXT: retq
10515 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10516 %3 = icmp ult <8 x i64> %2, <i64 18, i64 18, i64 18, i64 18, i64 18, i64 18, i64 18, i64 18>
10517 %4 = sext <8 x i1> %3 to <8 x i64>
10521 define <8 x i64> @ugt_18_v8i64(<8 x i64> %0) {
10522 ; AVX512F-LABEL: ugt_18_v8i64:
10523 ; AVX512F: # %bb.0:
10524 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10525 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10526 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10527 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10528 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10529 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10530 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10531 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10532 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10533 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10534 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10535 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10536 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10537 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10538 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10539 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10540 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10541 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10542 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10543 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10544 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10545 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10546 ; AVX512F-NEXT: retq
10548 ; AVX512BW-LABEL: ugt_18_v8i64:
10549 ; AVX512BW: # %bb.0:
10550 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10551 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10552 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10553 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10554 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10555 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10556 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10557 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10558 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10559 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10560 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10561 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10562 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10563 ; AVX512BW-NEXT: retq
10565 ; AVX512VPOPCNTDQ-LABEL: ugt_18_v8i64:
10566 ; AVX512VPOPCNTDQ: # %bb.0:
10567 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10568 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10569 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10570 ; AVX512VPOPCNTDQ-NEXT: retq
10572 ; BITALG-LABEL: ugt_18_v8i64:
10574 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10575 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10576 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10577 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10578 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10579 ; BITALG-NEXT: retq
10580 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10581 %3 = icmp ugt <8 x i64> %2, <i64 18, i64 18, i64 18, i64 18, i64 18, i64 18, i64 18, i64 18>
10582 %4 = sext <8 x i1> %3 to <8 x i64>
10586 define <8 x i64> @ult_19_v8i64(<8 x i64> %0) {
10587 ; AVX512F-LABEL: ult_19_v8i64:
10588 ; AVX512F: # %bb.0:
10589 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10590 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10591 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10592 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10593 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10594 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10595 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10596 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10597 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10598 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10599 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10600 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10601 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10602 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10603 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10604 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10605 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10606 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10607 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10608 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10609 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10610 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10611 ; AVX512F-NEXT: retq
10613 ; AVX512BW-LABEL: ult_19_v8i64:
10614 ; AVX512BW: # %bb.0:
10615 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10616 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10617 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10618 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10619 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10620 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10621 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10622 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10623 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10624 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10625 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10626 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10627 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10628 ; AVX512BW-NEXT: retq
10630 ; AVX512VPOPCNTDQ-LABEL: ult_19_v8i64:
10631 ; AVX512VPOPCNTDQ: # %bb.0:
10632 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10633 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10634 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10635 ; AVX512VPOPCNTDQ-NEXT: retq
10637 ; BITALG-LABEL: ult_19_v8i64:
10639 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10640 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10641 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10642 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10643 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10644 ; BITALG-NEXT: retq
10645 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10646 %3 = icmp ult <8 x i64> %2, <i64 19, i64 19, i64 19, i64 19, i64 19, i64 19, i64 19, i64 19>
10647 %4 = sext <8 x i1> %3 to <8 x i64>
10651 define <8 x i64> @ugt_19_v8i64(<8 x i64> %0) {
10652 ; AVX512F-LABEL: ugt_19_v8i64:
10653 ; AVX512F: # %bb.0:
10654 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10655 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10656 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10657 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10658 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10659 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10660 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10661 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10662 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10663 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10664 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10665 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10666 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10667 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10668 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10669 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10670 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10671 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10672 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10673 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10674 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10675 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10676 ; AVX512F-NEXT: retq
10678 ; AVX512BW-LABEL: ugt_19_v8i64:
10679 ; AVX512BW: # %bb.0:
10680 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10681 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10682 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10683 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10684 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10685 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10686 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10687 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10688 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10689 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10690 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10691 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10692 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10693 ; AVX512BW-NEXT: retq
10695 ; AVX512VPOPCNTDQ-LABEL: ugt_19_v8i64:
10696 ; AVX512VPOPCNTDQ: # %bb.0:
10697 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10698 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10699 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10700 ; AVX512VPOPCNTDQ-NEXT: retq
10702 ; BITALG-LABEL: ugt_19_v8i64:
10704 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10705 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10706 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10707 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10708 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10709 ; BITALG-NEXT: retq
10710 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10711 %3 = icmp ugt <8 x i64> %2, <i64 19, i64 19, i64 19, i64 19, i64 19, i64 19, i64 19, i64 19>
10712 %4 = sext <8 x i1> %3 to <8 x i64>
10716 define <8 x i64> @ult_20_v8i64(<8 x i64> %0) {
10717 ; AVX512F-LABEL: ult_20_v8i64:
10718 ; AVX512F: # %bb.0:
10719 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10720 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10721 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10722 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10723 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10724 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10725 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10726 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10727 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10728 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10729 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10730 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10731 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10732 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10733 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10734 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10735 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10736 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10737 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10738 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10739 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10740 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10741 ; AVX512F-NEXT: retq
10743 ; AVX512BW-LABEL: ult_20_v8i64:
10744 ; AVX512BW: # %bb.0:
10745 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10746 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10747 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10748 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10749 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10750 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10751 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10752 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10753 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10754 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10755 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10756 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10757 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10758 ; AVX512BW-NEXT: retq
10760 ; AVX512VPOPCNTDQ-LABEL: ult_20_v8i64:
10761 ; AVX512VPOPCNTDQ: # %bb.0:
10762 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10763 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10764 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10765 ; AVX512VPOPCNTDQ-NEXT: retq
10767 ; BITALG-LABEL: ult_20_v8i64:
10769 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10770 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10771 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10772 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10773 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10774 ; BITALG-NEXT: retq
10775 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10776 %3 = icmp ult <8 x i64> %2, <i64 20, i64 20, i64 20, i64 20, i64 20, i64 20, i64 20, i64 20>
10777 %4 = sext <8 x i1> %3 to <8 x i64>
10781 define <8 x i64> @ugt_20_v8i64(<8 x i64> %0) {
10782 ; AVX512F-LABEL: ugt_20_v8i64:
10783 ; AVX512F: # %bb.0:
10784 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10785 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10786 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10787 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10788 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10789 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10790 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10791 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10792 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10793 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10794 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10795 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10796 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10797 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10798 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10799 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10800 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10801 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10802 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10803 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10804 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10805 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10806 ; AVX512F-NEXT: retq
10808 ; AVX512BW-LABEL: ugt_20_v8i64:
10809 ; AVX512BW: # %bb.0:
10810 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10811 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10812 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10813 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10814 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10815 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10816 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10817 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10818 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10819 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10820 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10821 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10822 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10823 ; AVX512BW-NEXT: retq
10825 ; AVX512VPOPCNTDQ-LABEL: ugt_20_v8i64:
10826 ; AVX512VPOPCNTDQ: # %bb.0:
10827 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10828 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10829 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10830 ; AVX512VPOPCNTDQ-NEXT: retq
10832 ; BITALG-LABEL: ugt_20_v8i64:
10834 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10835 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10836 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10837 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10838 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10839 ; BITALG-NEXT: retq
10840 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10841 %3 = icmp ugt <8 x i64> %2, <i64 20, i64 20, i64 20, i64 20, i64 20, i64 20, i64 20, i64 20>
10842 %4 = sext <8 x i1> %3 to <8 x i64>
10846 define <8 x i64> @ult_21_v8i64(<8 x i64> %0) {
10847 ; AVX512F-LABEL: ult_21_v8i64:
10848 ; AVX512F: # %bb.0:
10849 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10850 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10851 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10852 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10853 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10854 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10855 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10856 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10857 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10858 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10859 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10860 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10861 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10862 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10863 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10864 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10865 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10866 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10867 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10868 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10869 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10870 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10871 ; AVX512F-NEXT: retq
10873 ; AVX512BW-LABEL: ult_21_v8i64:
10874 ; AVX512BW: # %bb.0:
10875 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10876 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10877 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10878 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10879 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10880 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10881 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10882 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10883 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10884 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10885 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10886 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10887 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10888 ; AVX512BW-NEXT: retq
10890 ; AVX512VPOPCNTDQ-LABEL: ult_21_v8i64:
10891 ; AVX512VPOPCNTDQ: # %bb.0:
10892 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10893 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10894 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10895 ; AVX512VPOPCNTDQ-NEXT: retq
10897 ; BITALG-LABEL: ult_21_v8i64:
10899 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10900 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10901 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10902 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10903 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10904 ; BITALG-NEXT: retq
10905 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10906 %3 = icmp ult <8 x i64> %2, <i64 21, i64 21, i64 21, i64 21, i64 21, i64 21, i64 21, i64 21>
10907 %4 = sext <8 x i1> %3 to <8 x i64>
10911 define <8 x i64> @ugt_21_v8i64(<8 x i64> %0) {
10912 ; AVX512F-LABEL: ugt_21_v8i64:
10913 ; AVX512F: # %bb.0:
10914 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10915 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10916 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10917 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10918 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10919 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10920 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10921 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10922 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10923 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10924 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10925 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10926 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10927 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10928 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10929 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10930 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10931 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10932 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10933 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10934 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10935 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10936 ; AVX512F-NEXT: retq
10938 ; AVX512BW-LABEL: ugt_21_v8i64:
10939 ; AVX512BW: # %bb.0:
10940 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10941 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10942 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10943 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
10944 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10945 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10946 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10947 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10948 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10949 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10950 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10951 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10952 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10953 ; AVX512BW-NEXT: retq
10955 ; AVX512VPOPCNTDQ-LABEL: ugt_21_v8i64:
10956 ; AVX512VPOPCNTDQ: # %bb.0:
10957 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10958 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10959 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10960 ; AVX512VPOPCNTDQ-NEXT: retq
10962 ; BITALG-LABEL: ugt_21_v8i64:
10964 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10965 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10966 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10967 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10968 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10969 ; BITALG-NEXT: retq
10970 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10971 %3 = icmp ugt <8 x i64> %2, <i64 21, i64 21, i64 21, i64 21, i64 21, i64 21, i64 21, i64 21>
10972 %4 = sext <8 x i1> %3 to <8 x i64>
10976 define <8 x i64> @ult_22_v8i64(<8 x i64> %0) {
10977 ; AVX512F-LABEL: ult_22_v8i64:
10978 ; AVX512F: # %bb.0:
10979 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10980 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10981 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10982 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10983 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
10984 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10985 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10986 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10987 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10988 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10989 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10990 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10991 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10992 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10993 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10994 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10995 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10996 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10997 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10998 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10999 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11000 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11001 ; AVX512F-NEXT: retq
11003 ; AVX512BW-LABEL: ult_22_v8i64:
11004 ; AVX512BW: # %bb.0:
11005 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11006 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11007 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11008 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11009 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11010 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11011 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11012 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11013 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11014 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11015 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11016 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11017 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11018 ; AVX512BW-NEXT: retq
11020 ; AVX512VPOPCNTDQ-LABEL: ult_22_v8i64:
11021 ; AVX512VPOPCNTDQ: # %bb.0:
11022 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11023 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11024 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11025 ; AVX512VPOPCNTDQ-NEXT: retq
11027 ; BITALG-LABEL: ult_22_v8i64:
11029 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11030 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11031 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11032 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11033 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11034 ; BITALG-NEXT: retq
11035 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11036 %3 = icmp ult <8 x i64> %2, <i64 22, i64 22, i64 22, i64 22, i64 22, i64 22, i64 22, i64 22>
11037 %4 = sext <8 x i1> %3 to <8 x i64>
11041 define <8 x i64> @ugt_22_v8i64(<8 x i64> %0) {
11042 ; AVX512F-LABEL: ugt_22_v8i64:
11043 ; AVX512F: # %bb.0:
11044 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11045 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11046 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11047 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11048 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11049 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11050 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11051 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11052 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11053 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11054 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11055 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11056 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11057 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11058 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11059 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11060 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11061 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11062 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11063 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11064 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11065 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11066 ; AVX512F-NEXT: retq
11068 ; AVX512BW-LABEL: ugt_22_v8i64:
11069 ; AVX512BW: # %bb.0:
11070 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11071 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11072 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11073 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11074 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11075 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11076 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11077 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11078 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11079 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11080 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11081 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11082 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11083 ; AVX512BW-NEXT: retq
11085 ; AVX512VPOPCNTDQ-LABEL: ugt_22_v8i64:
11086 ; AVX512VPOPCNTDQ: # %bb.0:
11087 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11088 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11089 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11090 ; AVX512VPOPCNTDQ-NEXT: retq
11092 ; BITALG-LABEL: ugt_22_v8i64:
11094 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11095 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11096 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11097 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11098 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11099 ; BITALG-NEXT: retq
11100 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11101 %3 = icmp ugt <8 x i64> %2, <i64 22, i64 22, i64 22, i64 22, i64 22, i64 22, i64 22, i64 22>
11102 %4 = sext <8 x i1> %3 to <8 x i64>
11106 define <8 x i64> @ult_23_v8i64(<8 x i64> %0) {
11107 ; AVX512F-LABEL: ult_23_v8i64:
11108 ; AVX512F: # %bb.0:
11109 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11110 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11111 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11112 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11113 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11114 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11115 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11116 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11117 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11118 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11119 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11120 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11121 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11122 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11123 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11124 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11125 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11126 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11127 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11128 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11129 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11130 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11131 ; AVX512F-NEXT: retq
11133 ; AVX512BW-LABEL: ult_23_v8i64:
11134 ; AVX512BW: # %bb.0:
11135 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11136 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11137 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11138 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11139 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11140 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11141 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11142 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11143 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11144 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11145 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11146 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11147 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11148 ; AVX512BW-NEXT: retq
11150 ; AVX512VPOPCNTDQ-LABEL: ult_23_v8i64:
11151 ; AVX512VPOPCNTDQ: # %bb.0:
11152 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11153 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11154 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11155 ; AVX512VPOPCNTDQ-NEXT: retq
11157 ; BITALG-LABEL: ult_23_v8i64:
11159 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11160 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11161 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11162 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11163 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11164 ; BITALG-NEXT: retq
11165 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11166 %3 = icmp ult <8 x i64> %2, <i64 23, i64 23, i64 23, i64 23, i64 23, i64 23, i64 23, i64 23>
11167 %4 = sext <8 x i1> %3 to <8 x i64>
11171 define <8 x i64> @ugt_23_v8i64(<8 x i64> %0) {
11172 ; AVX512F-LABEL: ugt_23_v8i64:
11173 ; AVX512F: # %bb.0:
11174 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11175 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11176 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11177 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11178 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11179 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11180 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11181 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11182 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11183 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11184 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11185 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11186 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11187 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11188 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11189 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11190 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11191 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11192 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11193 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11194 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11195 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11196 ; AVX512F-NEXT: retq
11198 ; AVX512BW-LABEL: ugt_23_v8i64:
11199 ; AVX512BW: # %bb.0:
11200 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11201 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11202 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11203 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11204 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11205 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11206 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11207 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11208 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11209 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11210 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11211 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11212 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11213 ; AVX512BW-NEXT: retq
11215 ; AVX512VPOPCNTDQ-LABEL: ugt_23_v8i64:
11216 ; AVX512VPOPCNTDQ: # %bb.0:
11217 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11218 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11219 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11220 ; AVX512VPOPCNTDQ-NEXT: retq
11222 ; BITALG-LABEL: ugt_23_v8i64:
11224 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11225 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11226 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11227 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11228 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11229 ; BITALG-NEXT: retq
11230 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11231 %3 = icmp ugt <8 x i64> %2, <i64 23, i64 23, i64 23, i64 23, i64 23, i64 23, i64 23, i64 23>
11232 %4 = sext <8 x i1> %3 to <8 x i64>
11236 define <8 x i64> @ult_24_v8i64(<8 x i64> %0) {
11237 ; AVX512F-LABEL: ult_24_v8i64:
11238 ; AVX512F: # %bb.0:
11239 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11240 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11241 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11242 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11243 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11244 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11245 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11246 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11247 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11248 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11249 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11250 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11251 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11252 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11253 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11254 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11255 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11256 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11257 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11258 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11259 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11260 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11261 ; AVX512F-NEXT: retq
11263 ; AVX512BW-LABEL: ult_24_v8i64:
11264 ; AVX512BW: # %bb.0:
11265 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11266 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11267 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11268 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11269 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11270 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11271 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11272 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11273 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11274 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11275 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11276 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11277 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11278 ; AVX512BW-NEXT: retq
11280 ; AVX512VPOPCNTDQ-LABEL: ult_24_v8i64:
11281 ; AVX512VPOPCNTDQ: # %bb.0:
11282 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11283 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11284 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11285 ; AVX512VPOPCNTDQ-NEXT: retq
11287 ; BITALG-LABEL: ult_24_v8i64:
11289 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11290 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11291 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11292 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11293 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11294 ; BITALG-NEXT: retq
11295 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11296 %3 = icmp ult <8 x i64> %2, <i64 24, i64 24, i64 24, i64 24, i64 24, i64 24, i64 24, i64 24>
11297 %4 = sext <8 x i1> %3 to <8 x i64>
11301 define <8 x i64> @ugt_24_v8i64(<8 x i64> %0) {
11302 ; AVX512F-LABEL: ugt_24_v8i64:
11303 ; AVX512F: # %bb.0:
11304 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11305 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11306 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11307 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11308 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11309 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11310 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11311 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11312 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11313 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11314 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11315 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11316 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11317 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11318 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11319 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11320 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11321 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11322 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11323 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11324 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11325 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11326 ; AVX512F-NEXT: retq
11328 ; AVX512BW-LABEL: ugt_24_v8i64:
11329 ; AVX512BW: # %bb.0:
11330 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11331 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11332 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11333 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11334 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11335 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11336 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11337 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11338 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11339 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11340 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11341 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11342 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11343 ; AVX512BW-NEXT: retq
11345 ; AVX512VPOPCNTDQ-LABEL: ugt_24_v8i64:
11346 ; AVX512VPOPCNTDQ: # %bb.0:
11347 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11348 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11349 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11350 ; AVX512VPOPCNTDQ-NEXT: retq
11352 ; BITALG-LABEL: ugt_24_v8i64:
11354 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11355 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11356 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11357 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11358 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11359 ; BITALG-NEXT: retq
11360 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11361 %3 = icmp ugt <8 x i64> %2, <i64 24, i64 24, i64 24, i64 24, i64 24, i64 24, i64 24, i64 24>
11362 %4 = sext <8 x i1> %3 to <8 x i64>
11366 define <8 x i64> @ult_25_v8i64(<8 x i64> %0) {
11367 ; AVX512F-LABEL: ult_25_v8i64:
11368 ; AVX512F: # %bb.0:
11369 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11370 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11371 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11372 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11373 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11374 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11375 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11376 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11377 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11378 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11379 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11380 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11381 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11382 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11383 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11384 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11385 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11386 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11387 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11388 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11389 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11390 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11391 ; AVX512F-NEXT: retq
11393 ; AVX512BW-LABEL: ult_25_v8i64:
11394 ; AVX512BW: # %bb.0:
11395 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11396 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11397 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11398 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11399 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11400 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11401 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11402 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11403 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11404 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11405 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11406 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11407 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11408 ; AVX512BW-NEXT: retq
11410 ; AVX512VPOPCNTDQ-LABEL: ult_25_v8i64:
11411 ; AVX512VPOPCNTDQ: # %bb.0:
11412 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11413 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11414 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11415 ; AVX512VPOPCNTDQ-NEXT: retq
11417 ; BITALG-LABEL: ult_25_v8i64:
11419 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11420 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11421 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11422 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11423 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11424 ; BITALG-NEXT: retq
11425 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11426 %3 = icmp ult <8 x i64> %2, <i64 25, i64 25, i64 25, i64 25, i64 25, i64 25, i64 25, i64 25>
11427 %4 = sext <8 x i1> %3 to <8 x i64>
11431 define <8 x i64> @ugt_25_v8i64(<8 x i64> %0) {
11432 ; AVX512F-LABEL: ugt_25_v8i64:
11433 ; AVX512F: # %bb.0:
11434 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11435 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11436 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11437 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11438 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11439 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11440 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11441 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11442 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11443 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11444 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11445 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11446 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11447 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11448 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11449 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11450 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11451 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11452 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11453 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11454 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11455 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11456 ; AVX512F-NEXT: retq
11458 ; AVX512BW-LABEL: ugt_25_v8i64:
11459 ; AVX512BW: # %bb.0:
11460 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11461 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11462 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11463 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11464 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11465 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11466 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11467 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11468 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11469 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11470 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11471 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11472 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11473 ; AVX512BW-NEXT: retq
11475 ; AVX512VPOPCNTDQ-LABEL: ugt_25_v8i64:
11476 ; AVX512VPOPCNTDQ: # %bb.0:
11477 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11478 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11479 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11480 ; AVX512VPOPCNTDQ-NEXT: retq
11482 ; BITALG-LABEL: ugt_25_v8i64:
11484 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11485 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11486 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11487 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11488 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11489 ; BITALG-NEXT: retq
11490 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11491 %3 = icmp ugt <8 x i64> %2, <i64 25, i64 25, i64 25, i64 25, i64 25, i64 25, i64 25, i64 25>
11492 %4 = sext <8 x i1> %3 to <8 x i64>
11496 define <8 x i64> @ult_26_v8i64(<8 x i64> %0) {
11497 ; AVX512F-LABEL: ult_26_v8i64:
11498 ; AVX512F: # %bb.0:
11499 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11500 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11501 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11502 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11503 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11504 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11505 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11506 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11507 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11508 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11509 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11510 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11511 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11512 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11513 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11514 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11515 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11516 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11517 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11518 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11519 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11520 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11521 ; AVX512F-NEXT: retq
11523 ; AVX512BW-LABEL: ult_26_v8i64:
11524 ; AVX512BW: # %bb.0:
11525 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11526 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11527 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11528 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11529 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11530 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11531 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11532 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11533 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11534 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11535 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11536 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11537 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11538 ; AVX512BW-NEXT: retq
11540 ; AVX512VPOPCNTDQ-LABEL: ult_26_v8i64:
11541 ; AVX512VPOPCNTDQ: # %bb.0:
11542 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11543 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11544 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11545 ; AVX512VPOPCNTDQ-NEXT: retq
11547 ; BITALG-LABEL: ult_26_v8i64:
11549 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11550 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11551 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11552 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11553 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11554 ; BITALG-NEXT: retq
11555 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11556 %3 = icmp ult <8 x i64> %2, <i64 26, i64 26, i64 26, i64 26, i64 26, i64 26, i64 26, i64 26>
11557 %4 = sext <8 x i1> %3 to <8 x i64>
11561 define <8 x i64> @ugt_26_v8i64(<8 x i64> %0) {
11562 ; AVX512F-LABEL: ugt_26_v8i64:
11563 ; AVX512F: # %bb.0:
11564 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11565 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11566 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11567 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11568 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11569 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11570 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11571 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11572 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11573 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11574 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11575 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11576 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11577 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11578 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11579 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11580 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11581 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11582 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11583 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11584 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11585 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11586 ; AVX512F-NEXT: retq
11588 ; AVX512BW-LABEL: ugt_26_v8i64:
11589 ; AVX512BW: # %bb.0:
11590 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11591 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11592 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11593 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11594 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11595 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11596 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11597 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11598 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11599 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11600 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11601 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11602 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11603 ; AVX512BW-NEXT: retq
11605 ; AVX512VPOPCNTDQ-LABEL: ugt_26_v8i64:
11606 ; AVX512VPOPCNTDQ: # %bb.0:
11607 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11608 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11609 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11610 ; AVX512VPOPCNTDQ-NEXT: retq
11612 ; BITALG-LABEL: ugt_26_v8i64:
11614 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11615 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11616 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11617 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11618 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11619 ; BITALG-NEXT: retq
11620 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11621 %3 = icmp ugt <8 x i64> %2, <i64 26, i64 26, i64 26, i64 26, i64 26, i64 26, i64 26, i64 26>
11622 %4 = sext <8 x i1> %3 to <8 x i64>
11626 define <8 x i64> @ult_27_v8i64(<8 x i64> %0) {
11627 ; AVX512F-LABEL: ult_27_v8i64:
11628 ; AVX512F: # %bb.0:
11629 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11630 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11631 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11632 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11633 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11634 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11635 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11636 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11637 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11638 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11639 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11640 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11641 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11642 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11643 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11644 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11645 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11646 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11647 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11648 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11649 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11650 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11651 ; AVX512F-NEXT: retq
11653 ; AVX512BW-LABEL: ult_27_v8i64:
11654 ; AVX512BW: # %bb.0:
11655 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11656 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11657 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11658 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11659 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11660 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11661 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11662 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11663 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11664 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11665 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11666 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11667 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11668 ; AVX512BW-NEXT: retq
11670 ; AVX512VPOPCNTDQ-LABEL: ult_27_v8i64:
11671 ; AVX512VPOPCNTDQ: # %bb.0:
11672 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11673 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11674 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11675 ; AVX512VPOPCNTDQ-NEXT: retq
11677 ; BITALG-LABEL: ult_27_v8i64:
11679 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11680 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11681 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11682 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11683 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11684 ; BITALG-NEXT: retq
11685 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11686 %3 = icmp ult <8 x i64> %2, <i64 27, i64 27, i64 27, i64 27, i64 27, i64 27, i64 27, i64 27>
11687 %4 = sext <8 x i1> %3 to <8 x i64>
11691 define <8 x i64> @ugt_27_v8i64(<8 x i64> %0) {
11692 ; AVX512F-LABEL: ugt_27_v8i64:
11693 ; AVX512F: # %bb.0:
11694 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11695 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11696 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11697 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11698 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11699 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11700 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11701 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11702 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11703 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11704 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11705 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11706 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11707 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11708 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11709 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11710 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11711 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11712 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11713 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11714 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11715 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11716 ; AVX512F-NEXT: retq
11718 ; AVX512BW-LABEL: ugt_27_v8i64:
11719 ; AVX512BW: # %bb.0:
11720 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11721 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11722 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11723 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11724 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11725 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11726 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11727 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11728 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11729 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11730 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11731 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11732 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11733 ; AVX512BW-NEXT: retq
11735 ; AVX512VPOPCNTDQ-LABEL: ugt_27_v8i64:
11736 ; AVX512VPOPCNTDQ: # %bb.0:
11737 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11738 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11739 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11740 ; AVX512VPOPCNTDQ-NEXT: retq
11742 ; BITALG-LABEL: ugt_27_v8i64:
11744 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11745 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11746 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11747 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11748 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11749 ; BITALG-NEXT: retq
11750 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11751 %3 = icmp ugt <8 x i64> %2, <i64 27, i64 27, i64 27, i64 27, i64 27, i64 27, i64 27, i64 27>
11752 %4 = sext <8 x i1> %3 to <8 x i64>
11756 define <8 x i64> @ult_28_v8i64(<8 x i64> %0) {
11757 ; AVX512F-LABEL: ult_28_v8i64:
11758 ; AVX512F: # %bb.0:
11759 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11760 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11761 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11762 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11763 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11764 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11765 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11766 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11767 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11768 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11769 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11770 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11771 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11772 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11773 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11774 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11775 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11776 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11777 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11778 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11779 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11780 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11781 ; AVX512F-NEXT: retq
11783 ; AVX512BW-LABEL: ult_28_v8i64:
11784 ; AVX512BW: # %bb.0:
11785 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11786 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11787 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11788 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11789 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11790 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11791 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11792 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11793 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11794 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11795 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11796 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11797 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11798 ; AVX512BW-NEXT: retq
11800 ; AVX512VPOPCNTDQ-LABEL: ult_28_v8i64:
11801 ; AVX512VPOPCNTDQ: # %bb.0:
11802 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11803 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11804 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11805 ; AVX512VPOPCNTDQ-NEXT: retq
11807 ; BITALG-LABEL: ult_28_v8i64:
11809 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11810 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11811 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11812 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11813 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11814 ; BITALG-NEXT: retq
11815 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11816 %3 = icmp ult <8 x i64> %2, <i64 28, i64 28, i64 28, i64 28, i64 28, i64 28, i64 28, i64 28>
11817 %4 = sext <8 x i1> %3 to <8 x i64>
11821 define <8 x i64> @ugt_28_v8i64(<8 x i64> %0) {
11822 ; AVX512F-LABEL: ugt_28_v8i64:
11823 ; AVX512F: # %bb.0:
11824 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11825 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11826 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11827 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11828 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11829 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11830 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11831 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11832 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11833 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11834 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11835 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11836 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11837 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11838 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11839 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11840 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11841 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11842 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11843 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11844 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11845 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11846 ; AVX512F-NEXT: retq
11848 ; AVX512BW-LABEL: ugt_28_v8i64:
11849 ; AVX512BW: # %bb.0:
11850 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11851 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11852 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11853 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11854 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11855 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11856 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11857 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11858 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11859 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11860 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11861 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11862 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11863 ; AVX512BW-NEXT: retq
11865 ; AVX512VPOPCNTDQ-LABEL: ugt_28_v8i64:
11866 ; AVX512VPOPCNTDQ: # %bb.0:
11867 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11868 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11869 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11870 ; AVX512VPOPCNTDQ-NEXT: retq
11872 ; BITALG-LABEL: ugt_28_v8i64:
11874 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11875 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11876 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11877 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11878 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11879 ; BITALG-NEXT: retq
11880 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11881 %3 = icmp ugt <8 x i64> %2, <i64 28, i64 28, i64 28, i64 28, i64 28, i64 28, i64 28, i64 28>
11882 %4 = sext <8 x i1> %3 to <8 x i64>
11886 define <8 x i64> @ult_29_v8i64(<8 x i64> %0) {
11887 ; AVX512F-LABEL: ult_29_v8i64:
11888 ; AVX512F: # %bb.0:
11889 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11890 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11891 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11892 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11893 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11894 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11895 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11896 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11897 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11898 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11899 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11900 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11901 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11902 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11903 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11904 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11905 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11906 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11907 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11908 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11909 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11910 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11911 ; AVX512F-NEXT: retq
11913 ; AVX512BW-LABEL: ult_29_v8i64:
11914 ; AVX512BW: # %bb.0:
11915 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11916 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11917 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11918 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11919 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11920 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11921 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11922 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11923 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11924 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11925 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11926 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11927 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11928 ; AVX512BW-NEXT: retq
11930 ; AVX512VPOPCNTDQ-LABEL: ult_29_v8i64:
11931 ; AVX512VPOPCNTDQ: # %bb.0:
11932 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11933 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11934 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11935 ; AVX512VPOPCNTDQ-NEXT: retq
11937 ; BITALG-LABEL: ult_29_v8i64:
11939 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11940 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11941 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11942 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11943 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11944 ; BITALG-NEXT: retq
11945 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11946 %3 = icmp ult <8 x i64> %2, <i64 29, i64 29, i64 29, i64 29, i64 29, i64 29, i64 29, i64 29>
11947 %4 = sext <8 x i1> %3 to <8 x i64>
11951 define <8 x i64> @ugt_29_v8i64(<8 x i64> %0) {
11952 ; AVX512F-LABEL: ugt_29_v8i64:
11953 ; AVX512F: # %bb.0:
11954 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11955 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11956 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11957 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11958 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
11959 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11960 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11961 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11962 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11963 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11964 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11965 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11966 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11967 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11968 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11969 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11970 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11971 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11972 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11973 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11974 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11975 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11976 ; AVX512F-NEXT: retq
11978 ; AVX512BW-LABEL: ugt_29_v8i64:
11979 ; AVX512BW: # %bb.0:
11980 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11981 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11982 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11983 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
11984 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11985 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11986 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11987 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11988 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11989 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11990 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11991 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11992 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11993 ; AVX512BW-NEXT: retq
11995 ; AVX512VPOPCNTDQ-LABEL: ugt_29_v8i64:
11996 ; AVX512VPOPCNTDQ: # %bb.0:
11997 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11998 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11999 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12000 ; AVX512VPOPCNTDQ-NEXT: retq
12002 ; BITALG-LABEL: ugt_29_v8i64:
12004 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12005 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12006 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12007 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12008 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12009 ; BITALG-NEXT: retq
12010 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12011 %3 = icmp ugt <8 x i64> %2, <i64 29, i64 29, i64 29, i64 29, i64 29, i64 29, i64 29, i64 29>
12012 %4 = sext <8 x i1> %3 to <8 x i64>
12016 define <8 x i64> @ult_30_v8i64(<8 x i64> %0) {
12017 ; AVX512F-LABEL: ult_30_v8i64:
12018 ; AVX512F: # %bb.0:
12019 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12020 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12021 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12022 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12023 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12024 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12025 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12026 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12027 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12028 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12029 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12030 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12031 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12032 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12033 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12034 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12035 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12036 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12037 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12038 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12039 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12040 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12041 ; AVX512F-NEXT: retq
12043 ; AVX512BW-LABEL: ult_30_v8i64:
12044 ; AVX512BW: # %bb.0:
12045 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12046 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12047 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12048 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12049 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12050 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12051 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12052 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12053 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12054 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12055 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12056 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12057 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12058 ; AVX512BW-NEXT: retq
12060 ; AVX512VPOPCNTDQ-LABEL: ult_30_v8i64:
12061 ; AVX512VPOPCNTDQ: # %bb.0:
12062 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12063 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12064 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12065 ; AVX512VPOPCNTDQ-NEXT: retq
12067 ; BITALG-LABEL: ult_30_v8i64:
12069 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12070 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12071 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12072 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12073 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12074 ; BITALG-NEXT: retq
12075 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12076 %3 = icmp ult <8 x i64> %2, <i64 30, i64 30, i64 30, i64 30, i64 30, i64 30, i64 30, i64 30>
12077 %4 = sext <8 x i1> %3 to <8 x i64>
12081 define <8 x i64> @ugt_30_v8i64(<8 x i64> %0) {
12082 ; AVX512F-LABEL: ugt_30_v8i64:
12083 ; AVX512F: # %bb.0:
12084 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12085 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12086 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12087 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12088 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12089 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12090 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12091 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12092 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12093 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12094 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12095 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12096 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12097 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12098 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12099 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12100 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12101 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12102 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12103 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12104 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12105 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12106 ; AVX512F-NEXT: retq
12108 ; AVX512BW-LABEL: ugt_30_v8i64:
12109 ; AVX512BW: # %bb.0:
12110 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12111 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12112 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12113 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12114 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12115 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12116 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12117 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12118 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12119 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12120 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12121 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12122 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12123 ; AVX512BW-NEXT: retq
12125 ; AVX512VPOPCNTDQ-LABEL: ugt_30_v8i64:
12126 ; AVX512VPOPCNTDQ: # %bb.0:
12127 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12128 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12129 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12130 ; AVX512VPOPCNTDQ-NEXT: retq
12132 ; BITALG-LABEL: ugt_30_v8i64:
12134 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12135 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12136 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12137 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12138 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12139 ; BITALG-NEXT: retq
12140 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12141 %3 = icmp ugt <8 x i64> %2, <i64 30, i64 30, i64 30, i64 30, i64 30, i64 30, i64 30, i64 30>
12142 %4 = sext <8 x i1> %3 to <8 x i64>
12146 define <8 x i64> @ult_31_v8i64(<8 x i64> %0) {
12147 ; AVX512F-LABEL: ult_31_v8i64:
12148 ; AVX512F: # %bb.0:
12149 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12150 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12151 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12152 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12153 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12154 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12155 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12156 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12157 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12158 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12159 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12160 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12161 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12162 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12163 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12164 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12165 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12166 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12167 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12168 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12169 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12170 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12171 ; AVX512F-NEXT: retq
12173 ; AVX512BW-LABEL: ult_31_v8i64:
12174 ; AVX512BW: # %bb.0:
12175 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12176 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12177 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12178 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12179 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12180 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12181 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12182 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12183 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12184 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12185 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12186 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12187 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12188 ; AVX512BW-NEXT: retq
12190 ; AVX512VPOPCNTDQ-LABEL: ult_31_v8i64:
12191 ; AVX512VPOPCNTDQ: # %bb.0:
12192 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12193 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12194 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12195 ; AVX512VPOPCNTDQ-NEXT: retq
12197 ; BITALG-LABEL: ult_31_v8i64:
12199 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12200 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12201 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12202 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12203 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12204 ; BITALG-NEXT: retq
12205 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12206 %3 = icmp ult <8 x i64> %2, <i64 31, i64 31, i64 31, i64 31, i64 31, i64 31, i64 31, i64 31>
12207 %4 = sext <8 x i1> %3 to <8 x i64>
12211 define <8 x i64> @ugt_31_v8i64(<8 x i64> %0) {
12212 ; AVX512F-LABEL: ugt_31_v8i64:
12213 ; AVX512F: # %bb.0:
12214 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12215 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12216 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12217 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12218 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12219 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12220 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12221 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12222 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12223 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12224 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12225 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12226 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12227 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12228 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12229 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12230 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12231 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12232 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12233 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12234 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12235 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12236 ; AVX512F-NEXT: retq
12238 ; AVX512BW-LABEL: ugt_31_v8i64:
12239 ; AVX512BW: # %bb.0:
12240 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12241 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12242 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12243 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12244 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12245 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12246 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12247 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12248 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12249 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12250 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12251 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12252 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12253 ; AVX512BW-NEXT: retq
12255 ; AVX512VPOPCNTDQ-LABEL: ugt_31_v8i64:
12256 ; AVX512VPOPCNTDQ: # %bb.0:
12257 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12258 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12259 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12260 ; AVX512VPOPCNTDQ-NEXT: retq
12262 ; BITALG-LABEL: ugt_31_v8i64:
12264 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12265 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12266 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12267 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12268 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12269 ; BITALG-NEXT: retq
12270 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12271 %3 = icmp ugt <8 x i64> %2, <i64 31, i64 31, i64 31, i64 31, i64 31, i64 31, i64 31, i64 31>
12272 %4 = sext <8 x i1> %3 to <8 x i64>
12276 define <8 x i64> @ult_32_v8i64(<8 x i64> %0) {
12277 ; AVX512F-LABEL: ult_32_v8i64:
12278 ; AVX512F: # %bb.0:
12279 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12280 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12281 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12282 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12283 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12284 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12285 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12286 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12287 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12288 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12289 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12290 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12291 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12292 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12293 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12294 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12295 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12296 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12297 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12298 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12299 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12300 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12301 ; AVX512F-NEXT: retq
12303 ; AVX512BW-LABEL: ult_32_v8i64:
12304 ; AVX512BW: # %bb.0:
12305 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12306 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12307 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12308 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12309 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12310 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12311 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12312 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12313 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12314 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12315 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12316 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12317 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12318 ; AVX512BW-NEXT: retq
12320 ; AVX512VPOPCNTDQ-LABEL: ult_32_v8i64:
12321 ; AVX512VPOPCNTDQ: # %bb.0:
12322 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12323 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12324 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12325 ; AVX512VPOPCNTDQ-NEXT: retq
12327 ; BITALG-LABEL: ult_32_v8i64:
12329 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12330 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12331 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12332 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12333 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12334 ; BITALG-NEXT: retq
12335 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12336 %3 = icmp ult <8 x i64> %2, <i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32>
12337 %4 = sext <8 x i1> %3 to <8 x i64>
12341 define <8 x i64> @ugt_32_v8i64(<8 x i64> %0) {
12342 ; AVX512F-LABEL: ugt_32_v8i64:
12343 ; AVX512F: # %bb.0:
12344 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12345 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12346 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12347 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12348 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12349 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12350 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12351 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12352 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12353 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12354 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12355 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12356 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12357 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12358 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12359 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12360 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12361 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12362 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12363 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12364 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12365 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12366 ; AVX512F-NEXT: retq
12368 ; AVX512BW-LABEL: ugt_32_v8i64:
12369 ; AVX512BW: # %bb.0:
12370 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12371 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12372 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12373 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12374 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12375 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12376 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12377 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12378 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12379 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12380 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12381 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12382 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12383 ; AVX512BW-NEXT: retq
12385 ; AVX512VPOPCNTDQ-LABEL: ugt_32_v8i64:
12386 ; AVX512VPOPCNTDQ: # %bb.0:
12387 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12388 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12389 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12390 ; AVX512VPOPCNTDQ-NEXT: retq
12392 ; BITALG-LABEL: ugt_32_v8i64:
12394 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12395 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12396 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12397 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12398 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12399 ; BITALG-NEXT: retq
12400 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12401 %3 = icmp ugt <8 x i64> %2, <i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32>
12402 %4 = sext <8 x i1> %3 to <8 x i64>
12406 define <8 x i64> @ult_33_v8i64(<8 x i64> %0) {
12407 ; AVX512F-LABEL: ult_33_v8i64:
12408 ; AVX512F: # %bb.0:
12409 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12410 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12411 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12412 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12413 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12414 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12415 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12416 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12417 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12418 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12419 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12420 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12421 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12422 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12423 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12424 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12425 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12426 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12427 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12428 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12429 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12430 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12431 ; AVX512F-NEXT: retq
12433 ; AVX512BW-LABEL: ult_33_v8i64:
12434 ; AVX512BW: # %bb.0:
12435 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12436 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12437 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12438 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12439 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12440 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12441 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12442 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12443 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12444 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12445 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12446 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12447 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12448 ; AVX512BW-NEXT: retq
12450 ; AVX512VPOPCNTDQ-LABEL: ult_33_v8i64:
12451 ; AVX512VPOPCNTDQ: # %bb.0:
12452 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12453 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12454 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12455 ; AVX512VPOPCNTDQ-NEXT: retq
12457 ; BITALG-LABEL: ult_33_v8i64:
12459 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12460 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12461 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12462 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12463 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12464 ; BITALG-NEXT: retq
12465 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12466 %3 = icmp ult <8 x i64> %2, <i64 33, i64 33, i64 33, i64 33, i64 33, i64 33, i64 33, i64 33>
12467 %4 = sext <8 x i1> %3 to <8 x i64>
12471 define <8 x i64> @ugt_33_v8i64(<8 x i64> %0) {
12472 ; AVX512F-LABEL: ugt_33_v8i64:
12473 ; AVX512F: # %bb.0:
12474 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12475 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12476 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12477 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12478 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12479 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12480 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12481 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12482 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12483 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12484 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12485 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12486 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12487 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12488 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12489 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12490 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12491 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12492 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12493 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12494 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12495 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12496 ; AVX512F-NEXT: retq
12498 ; AVX512BW-LABEL: ugt_33_v8i64:
12499 ; AVX512BW: # %bb.0:
12500 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12501 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12502 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12503 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12504 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12505 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12506 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12507 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12508 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12509 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12510 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12511 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12512 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12513 ; AVX512BW-NEXT: retq
12515 ; AVX512VPOPCNTDQ-LABEL: ugt_33_v8i64:
12516 ; AVX512VPOPCNTDQ: # %bb.0:
12517 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12518 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12519 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12520 ; AVX512VPOPCNTDQ-NEXT: retq
12522 ; BITALG-LABEL: ugt_33_v8i64:
12524 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12525 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12526 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12527 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12528 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12529 ; BITALG-NEXT: retq
12530 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12531 %3 = icmp ugt <8 x i64> %2, <i64 33, i64 33, i64 33, i64 33, i64 33, i64 33, i64 33, i64 33>
12532 %4 = sext <8 x i1> %3 to <8 x i64>
12536 define <8 x i64> @ult_34_v8i64(<8 x i64> %0) {
12537 ; AVX512F-LABEL: ult_34_v8i64:
12538 ; AVX512F: # %bb.0:
12539 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12540 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12541 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12542 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12543 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12544 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12545 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12546 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12547 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12548 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12549 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12550 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12551 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12552 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12553 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12554 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12555 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12556 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12557 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12558 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12559 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12560 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12561 ; AVX512F-NEXT: retq
12563 ; AVX512BW-LABEL: ult_34_v8i64:
12564 ; AVX512BW: # %bb.0:
12565 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12566 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12567 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12568 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12569 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12570 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12571 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12572 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12573 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12574 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12575 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12576 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12577 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12578 ; AVX512BW-NEXT: retq
12580 ; AVX512VPOPCNTDQ-LABEL: ult_34_v8i64:
12581 ; AVX512VPOPCNTDQ: # %bb.0:
12582 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12583 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12584 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12585 ; AVX512VPOPCNTDQ-NEXT: retq
12587 ; BITALG-LABEL: ult_34_v8i64:
12589 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12590 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12591 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12592 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12593 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12594 ; BITALG-NEXT: retq
12595 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12596 %3 = icmp ult <8 x i64> %2, <i64 34, i64 34, i64 34, i64 34, i64 34, i64 34, i64 34, i64 34>
12597 %4 = sext <8 x i1> %3 to <8 x i64>
12601 define <8 x i64> @ugt_34_v8i64(<8 x i64> %0) {
12602 ; AVX512F-LABEL: ugt_34_v8i64:
12603 ; AVX512F: # %bb.0:
12604 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12605 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12606 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12607 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12608 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12609 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12610 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12611 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12612 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12613 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12614 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12615 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12616 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12617 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12618 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12619 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12620 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12621 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12622 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12623 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12624 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12625 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12626 ; AVX512F-NEXT: retq
12628 ; AVX512BW-LABEL: ugt_34_v8i64:
12629 ; AVX512BW: # %bb.0:
12630 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12631 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12632 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12633 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12634 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12635 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12636 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12637 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12638 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12639 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12640 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12641 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12642 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12643 ; AVX512BW-NEXT: retq
12645 ; AVX512VPOPCNTDQ-LABEL: ugt_34_v8i64:
12646 ; AVX512VPOPCNTDQ: # %bb.0:
12647 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12648 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12649 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12650 ; AVX512VPOPCNTDQ-NEXT: retq
12652 ; BITALG-LABEL: ugt_34_v8i64:
12654 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12655 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12656 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12657 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12658 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12659 ; BITALG-NEXT: retq
12660 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12661 %3 = icmp ugt <8 x i64> %2, <i64 34, i64 34, i64 34, i64 34, i64 34, i64 34, i64 34, i64 34>
12662 %4 = sext <8 x i1> %3 to <8 x i64>
12666 define <8 x i64> @ult_35_v8i64(<8 x i64> %0) {
12667 ; AVX512F-LABEL: ult_35_v8i64:
12668 ; AVX512F: # %bb.0:
12669 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12670 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12671 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12672 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12673 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12674 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12675 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12676 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12677 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12678 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12679 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12680 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12681 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12682 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12683 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12684 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12685 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12686 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12687 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12688 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12689 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12690 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12691 ; AVX512F-NEXT: retq
12693 ; AVX512BW-LABEL: ult_35_v8i64:
12694 ; AVX512BW: # %bb.0:
12695 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12696 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12697 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12698 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12699 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12700 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12701 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12702 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12703 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12704 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12705 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12706 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12707 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12708 ; AVX512BW-NEXT: retq
12710 ; AVX512VPOPCNTDQ-LABEL: ult_35_v8i64:
12711 ; AVX512VPOPCNTDQ: # %bb.0:
12712 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12713 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12714 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12715 ; AVX512VPOPCNTDQ-NEXT: retq
12717 ; BITALG-LABEL: ult_35_v8i64:
12719 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12720 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12721 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12722 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12723 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12724 ; BITALG-NEXT: retq
12725 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12726 %3 = icmp ult <8 x i64> %2, <i64 35, i64 35, i64 35, i64 35, i64 35, i64 35, i64 35, i64 35>
12727 %4 = sext <8 x i1> %3 to <8 x i64>
12731 define <8 x i64> @ugt_35_v8i64(<8 x i64> %0) {
12732 ; AVX512F-LABEL: ugt_35_v8i64:
12733 ; AVX512F: # %bb.0:
12734 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12735 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12736 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12737 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12738 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12739 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12740 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12741 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12742 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12743 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12744 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12745 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12746 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12747 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12748 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12749 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12750 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12751 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12752 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12753 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12754 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12755 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12756 ; AVX512F-NEXT: retq
12758 ; AVX512BW-LABEL: ugt_35_v8i64:
12759 ; AVX512BW: # %bb.0:
12760 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12761 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12762 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12763 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12764 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12765 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12766 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12767 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12768 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12769 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12770 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12771 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12772 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12773 ; AVX512BW-NEXT: retq
12775 ; AVX512VPOPCNTDQ-LABEL: ugt_35_v8i64:
12776 ; AVX512VPOPCNTDQ: # %bb.0:
12777 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12778 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12779 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12780 ; AVX512VPOPCNTDQ-NEXT: retq
12782 ; BITALG-LABEL: ugt_35_v8i64:
12784 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12785 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12786 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12787 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12788 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12789 ; BITALG-NEXT: retq
12790 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12791 %3 = icmp ugt <8 x i64> %2, <i64 35, i64 35, i64 35, i64 35, i64 35, i64 35, i64 35, i64 35>
12792 %4 = sext <8 x i1> %3 to <8 x i64>
12796 define <8 x i64> @ult_36_v8i64(<8 x i64> %0) {
12797 ; AVX512F-LABEL: ult_36_v8i64:
12798 ; AVX512F: # %bb.0:
12799 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12800 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12801 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12802 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12803 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12804 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12805 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12806 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12807 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12808 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12809 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12810 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12811 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12812 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12813 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12814 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12815 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12816 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12817 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12818 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12819 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12820 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12821 ; AVX512F-NEXT: retq
12823 ; AVX512BW-LABEL: ult_36_v8i64:
12824 ; AVX512BW: # %bb.0:
12825 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12826 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12827 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12828 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12829 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12830 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12831 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12832 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12833 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12834 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12835 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12836 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12837 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12838 ; AVX512BW-NEXT: retq
12840 ; AVX512VPOPCNTDQ-LABEL: ult_36_v8i64:
12841 ; AVX512VPOPCNTDQ: # %bb.0:
12842 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12843 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12844 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12845 ; AVX512VPOPCNTDQ-NEXT: retq
12847 ; BITALG-LABEL: ult_36_v8i64:
12849 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12850 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12851 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12852 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12853 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12854 ; BITALG-NEXT: retq
12855 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12856 %3 = icmp ult <8 x i64> %2, <i64 36, i64 36, i64 36, i64 36, i64 36, i64 36, i64 36, i64 36>
12857 %4 = sext <8 x i1> %3 to <8 x i64>
12861 define <8 x i64> @ugt_36_v8i64(<8 x i64> %0) {
12862 ; AVX512F-LABEL: ugt_36_v8i64:
12863 ; AVX512F: # %bb.0:
12864 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12865 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12866 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12867 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12868 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12869 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12870 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12871 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12872 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12873 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12874 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12875 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12876 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12877 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12878 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12879 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12880 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12881 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12882 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12883 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12884 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12885 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12886 ; AVX512F-NEXT: retq
12888 ; AVX512BW-LABEL: ugt_36_v8i64:
12889 ; AVX512BW: # %bb.0:
12890 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12891 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12892 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12893 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12894 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12895 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12896 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12897 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12898 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12899 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12900 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12901 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12902 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12903 ; AVX512BW-NEXT: retq
12905 ; AVX512VPOPCNTDQ-LABEL: ugt_36_v8i64:
12906 ; AVX512VPOPCNTDQ: # %bb.0:
12907 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12908 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12909 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12910 ; AVX512VPOPCNTDQ-NEXT: retq
12912 ; BITALG-LABEL: ugt_36_v8i64:
12914 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12915 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12916 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12917 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12918 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12919 ; BITALG-NEXT: retq
12920 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12921 %3 = icmp ugt <8 x i64> %2, <i64 36, i64 36, i64 36, i64 36, i64 36, i64 36, i64 36, i64 36>
12922 %4 = sext <8 x i1> %3 to <8 x i64>
12926 define <8 x i64> @ult_37_v8i64(<8 x i64> %0) {
12927 ; AVX512F-LABEL: ult_37_v8i64:
12928 ; AVX512F: # %bb.0:
12929 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12930 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12931 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12932 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12933 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12934 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12935 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12936 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12937 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12938 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12939 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12940 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12941 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12942 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12943 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12944 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12945 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12946 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12947 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12948 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12949 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12950 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12951 ; AVX512F-NEXT: retq
12953 ; AVX512BW-LABEL: ult_37_v8i64:
12954 ; AVX512BW: # %bb.0:
12955 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12956 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12957 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12958 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
12959 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12960 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12961 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12962 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12963 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12964 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12965 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12966 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12967 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12968 ; AVX512BW-NEXT: retq
12970 ; AVX512VPOPCNTDQ-LABEL: ult_37_v8i64:
12971 ; AVX512VPOPCNTDQ: # %bb.0:
12972 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12973 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12974 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12975 ; AVX512VPOPCNTDQ-NEXT: retq
12977 ; BITALG-LABEL: ult_37_v8i64:
12979 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12980 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12981 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12982 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12983 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12984 ; BITALG-NEXT: retq
12985 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12986 %3 = icmp ult <8 x i64> %2, <i64 37, i64 37, i64 37, i64 37, i64 37, i64 37, i64 37, i64 37>
12987 %4 = sext <8 x i1> %3 to <8 x i64>
12991 define <8 x i64> @ugt_37_v8i64(<8 x i64> %0) {
12992 ; AVX512F-LABEL: ugt_37_v8i64:
12993 ; AVX512F: # %bb.0:
12994 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12995 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12996 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12997 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12998 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
12999 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13000 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13001 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13002 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13003 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13004 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13005 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13006 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13007 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13008 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13009 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13010 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13011 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13012 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13013 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13014 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13015 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13016 ; AVX512F-NEXT: retq
13018 ; AVX512BW-LABEL: ugt_37_v8i64:
13019 ; AVX512BW: # %bb.0:
13020 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13021 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13022 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13023 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13024 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13025 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13026 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13027 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13028 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13029 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13030 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13031 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13032 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13033 ; AVX512BW-NEXT: retq
13035 ; AVX512VPOPCNTDQ-LABEL: ugt_37_v8i64:
13036 ; AVX512VPOPCNTDQ: # %bb.0:
13037 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13038 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13039 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13040 ; AVX512VPOPCNTDQ-NEXT: retq
13042 ; BITALG-LABEL: ugt_37_v8i64:
13044 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13045 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13046 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13047 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13048 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13049 ; BITALG-NEXT: retq
13050 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13051 %3 = icmp ugt <8 x i64> %2, <i64 37, i64 37, i64 37, i64 37, i64 37, i64 37, i64 37, i64 37>
13052 %4 = sext <8 x i1> %3 to <8 x i64>
13056 define <8 x i64> @ult_38_v8i64(<8 x i64> %0) {
13057 ; AVX512F-LABEL: ult_38_v8i64:
13058 ; AVX512F: # %bb.0:
13059 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13060 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13061 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13062 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13063 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13064 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13065 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13066 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13067 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13068 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13069 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13070 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13071 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13072 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13073 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13074 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13075 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13076 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13077 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13078 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13079 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13080 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13081 ; AVX512F-NEXT: retq
13083 ; AVX512BW-LABEL: ult_38_v8i64:
13084 ; AVX512BW: # %bb.0:
13085 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13086 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13087 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13088 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13089 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13090 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13091 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13092 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13093 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13094 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13095 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13096 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13097 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13098 ; AVX512BW-NEXT: retq
13100 ; AVX512VPOPCNTDQ-LABEL: ult_38_v8i64:
13101 ; AVX512VPOPCNTDQ: # %bb.0:
13102 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13103 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13104 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13105 ; AVX512VPOPCNTDQ-NEXT: retq
13107 ; BITALG-LABEL: ult_38_v8i64:
13109 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13110 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13111 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13112 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13113 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13114 ; BITALG-NEXT: retq
13115 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13116 %3 = icmp ult <8 x i64> %2, <i64 38, i64 38, i64 38, i64 38, i64 38, i64 38, i64 38, i64 38>
13117 %4 = sext <8 x i1> %3 to <8 x i64>
13121 define <8 x i64> @ugt_38_v8i64(<8 x i64> %0) {
13122 ; AVX512F-LABEL: ugt_38_v8i64:
13123 ; AVX512F: # %bb.0:
13124 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13125 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13126 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13127 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13128 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13129 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13130 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13131 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13132 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13133 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13134 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13135 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13136 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13137 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13138 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13139 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13140 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13141 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13142 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13143 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13144 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13145 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13146 ; AVX512F-NEXT: retq
13148 ; AVX512BW-LABEL: ugt_38_v8i64:
13149 ; AVX512BW: # %bb.0:
13150 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13151 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13152 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13153 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13154 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13155 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13156 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13157 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13158 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13159 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13160 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13161 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13162 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13163 ; AVX512BW-NEXT: retq
13165 ; AVX512VPOPCNTDQ-LABEL: ugt_38_v8i64:
13166 ; AVX512VPOPCNTDQ: # %bb.0:
13167 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13168 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13169 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13170 ; AVX512VPOPCNTDQ-NEXT: retq
13172 ; BITALG-LABEL: ugt_38_v8i64:
13174 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13175 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13176 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13177 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13178 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13179 ; BITALG-NEXT: retq
13180 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13181 %3 = icmp ugt <8 x i64> %2, <i64 38, i64 38, i64 38, i64 38, i64 38, i64 38, i64 38, i64 38>
13182 %4 = sext <8 x i1> %3 to <8 x i64>
13186 define <8 x i64> @ult_39_v8i64(<8 x i64> %0) {
13187 ; AVX512F-LABEL: ult_39_v8i64:
13188 ; AVX512F: # %bb.0:
13189 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13190 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13191 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13192 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13193 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13194 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13195 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13196 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13197 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13198 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13199 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13200 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13201 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13202 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13203 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13204 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13205 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13206 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13207 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13208 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13209 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13210 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13211 ; AVX512F-NEXT: retq
13213 ; AVX512BW-LABEL: ult_39_v8i64:
13214 ; AVX512BW: # %bb.0:
13215 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13216 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13217 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13218 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13219 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13220 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13221 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13222 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13223 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13224 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13225 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13226 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13227 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13228 ; AVX512BW-NEXT: retq
13230 ; AVX512VPOPCNTDQ-LABEL: ult_39_v8i64:
13231 ; AVX512VPOPCNTDQ: # %bb.0:
13232 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13233 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13234 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13235 ; AVX512VPOPCNTDQ-NEXT: retq
13237 ; BITALG-LABEL: ult_39_v8i64:
13239 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13240 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13241 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13242 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13243 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13244 ; BITALG-NEXT: retq
13245 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13246 %3 = icmp ult <8 x i64> %2, <i64 39, i64 39, i64 39, i64 39, i64 39, i64 39, i64 39, i64 39>
13247 %4 = sext <8 x i1> %3 to <8 x i64>
13251 define <8 x i64> @ugt_39_v8i64(<8 x i64> %0) {
13252 ; AVX512F-LABEL: ugt_39_v8i64:
13253 ; AVX512F: # %bb.0:
13254 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13255 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13256 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13257 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13258 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13259 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13260 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13261 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13262 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13263 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13264 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13265 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13266 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13267 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13268 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13269 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13270 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13271 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13272 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13273 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13274 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13275 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13276 ; AVX512F-NEXT: retq
13278 ; AVX512BW-LABEL: ugt_39_v8i64:
13279 ; AVX512BW: # %bb.0:
13280 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13281 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13282 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13283 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13284 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13285 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13286 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13287 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13288 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13289 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13290 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13291 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13292 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13293 ; AVX512BW-NEXT: retq
13295 ; AVX512VPOPCNTDQ-LABEL: ugt_39_v8i64:
13296 ; AVX512VPOPCNTDQ: # %bb.0:
13297 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13298 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13299 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13300 ; AVX512VPOPCNTDQ-NEXT: retq
13302 ; BITALG-LABEL: ugt_39_v8i64:
13304 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13305 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13306 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13307 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13308 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13309 ; BITALG-NEXT: retq
13310 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13311 %3 = icmp ugt <8 x i64> %2, <i64 39, i64 39, i64 39, i64 39, i64 39, i64 39, i64 39, i64 39>
13312 %4 = sext <8 x i1> %3 to <8 x i64>
13316 define <8 x i64> @ult_40_v8i64(<8 x i64> %0) {
13317 ; AVX512F-LABEL: ult_40_v8i64:
13318 ; AVX512F: # %bb.0:
13319 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13320 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13321 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13322 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13323 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13324 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13325 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13326 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13327 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13328 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13329 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13330 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13331 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13332 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13333 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13334 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13335 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13336 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13337 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13338 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13339 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13340 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13341 ; AVX512F-NEXT: retq
13343 ; AVX512BW-LABEL: ult_40_v8i64:
13344 ; AVX512BW: # %bb.0:
13345 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13346 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13347 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13348 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13349 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13350 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13351 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13352 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13353 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13354 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13355 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13356 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13357 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13358 ; AVX512BW-NEXT: retq
13360 ; AVX512VPOPCNTDQ-LABEL: ult_40_v8i64:
13361 ; AVX512VPOPCNTDQ: # %bb.0:
13362 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13363 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13364 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13365 ; AVX512VPOPCNTDQ-NEXT: retq
13367 ; BITALG-LABEL: ult_40_v8i64:
13369 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13370 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13371 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13372 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13373 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13374 ; BITALG-NEXT: retq
13375 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13376 %3 = icmp ult <8 x i64> %2, <i64 40, i64 40, i64 40, i64 40, i64 40, i64 40, i64 40, i64 40>
13377 %4 = sext <8 x i1> %3 to <8 x i64>
13381 define <8 x i64> @ugt_40_v8i64(<8 x i64> %0) {
13382 ; AVX512F-LABEL: ugt_40_v8i64:
13383 ; AVX512F: # %bb.0:
13384 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13385 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13386 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13387 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13388 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13389 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13390 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13391 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13392 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13393 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13394 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13395 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13396 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13397 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13398 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13399 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13400 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13401 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13402 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13403 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13404 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13405 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13406 ; AVX512F-NEXT: retq
13408 ; AVX512BW-LABEL: ugt_40_v8i64:
13409 ; AVX512BW: # %bb.0:
13410 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13411 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13412 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13413 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13414 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13415 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13416 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13417 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13418 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13419 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13420 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13421 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13422 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13423 ; AVX512BW-NEXT: retq
13425 ; AVX512VPOPCNTDQ-LABEL: ugt_40_v8i64:
13426 ; AVX512VPOPCNTDQ: # %bb.0:
13427 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13428 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13429 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13430 ; AVX512VPOPCNTDQ-NEXT: retq
13432 ; BITALG-LABEL: ugt_40_v8i64:
13434 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13435 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13436 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13437 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13438 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13439 ; BITALG-NEXT: retq
13440 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13441 %3 = icmp ugt <8 x i64> %2, <i64 40, i64 40, i64 40, i64 40, i64 40, i64 40, i64 40, i64 40>
13442 %4 = sext <8 x i1> %3 to <8 x i64>
13446 define <8 x i64> @ult_41_v8i64(<8 x i64> %0) {
13447 ; AVX512F-LABEL: ult_41_v8i64:
13448 ; AVX512F: # %bb.0:
13449 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13450 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13451 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13452 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13453 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13454 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13455 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13456 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13457 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13458 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13459 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13460 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13461 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13462 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13463 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13464 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13465 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13466 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13467 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13468 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13469 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13470 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13471 ; AVX512F-NEXT: retq
13473 ; AVX512BW-LABEL: ult_41_v8i64:
13474 ; AVX512BW: # %bb.0:
13475 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13476 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13477 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13478 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13479 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13480 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13481 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13482 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13483 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13484 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13485 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13486 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13487 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13488 ; AVX512BW-NEXT: retq
13490 ; AVX512VPOPCNTDQ-LABEL: ult_41_v8i64:
13491 ; AVX512VPOPCNTDQ: # %bb.0:
13492 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13493 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13494 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13495 ; AVX512VPOPCNTDQ-NEXT: retq
13497 ; BITALG-LABEL: ult_41_v8i64:
13499 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13500 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13501 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13502 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13503 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13504 ; BITALG-NEXT: retq
13505 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13506 %3 = icmp ult <8 x i64> %2, <i64 41, i64 41, i64 41, i64 41, i64 41, i64 41, i64 41, i64 41>
13507 %4 = sext <8 x i1> %3 to <8 x i64>
13511 define <8 x i64> @ugt_41_v8i64(<8 x i64> %0) {
13512 ; AVX512F-LABEL: ugt_41_v8i64:
13513 ; AVX512F: # %bb.0:
13514 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13515 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13516 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13517 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13518 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13519 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13520 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13521 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13522 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13523 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13524 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13525 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13526 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13527 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13528 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13529 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13530 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13531 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13532 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13533 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13534 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13535 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13536 ; AVX512F-NEXT: retq
13538 ; AVX512BW-LABEL: ugt_41_v8i64:
13539 ; AVX512BW: # %bb.0:
13540 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13541 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13542 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13543 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13544 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13545 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13546 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13547 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13548 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13549 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13550 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13551 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13552 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13553 ; AVX512BW-NEXT: retq
13555 ; AVX512VPOPCNTDQ-LABEL: ugt_41_v8i64:
13556 ; AVX512VPOPCNTDQ: # %bb.0:
13557 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13558 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13559 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13560 ; AVX512VPOPCNTDQ-NEXT: retq
13562 ; BITALG-LABEL: ugt_41_v8i64:
13564 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13565 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13566 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13567 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13568 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13569 ; BITALG-NEXT: retq
13570 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13571 %3 = icmp ugt <8 x i64> %2, <i64 41, i64 41, i64 41, i64 41, i64 41, i64 41, i64 41, i64 41>
13572 %4 = sext <8 x i1> %3 to <8 x i64>
13576 define <8 x i64> @ult_42_v8i64(<8 x i64> %0) {
13577 ; AVX512F-LABEL: ult_42_v8i64:
13578 ; AVX512F: # %bb.0:
13579 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13580 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13581 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13582 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13583 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13584 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13585 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13586 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13587 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13588 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13589 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13590 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13591 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13592 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13593 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13594 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13595 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13596 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13597 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13598 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13599 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13600 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13601 ; AVX512F-NEXT: retq
13603 ; AVX512BW-LABEL: ult_42_v8i64:
13604 ; AVX512BW: # %bb.0:
13605 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13606 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13607 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13608 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13609 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13610 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13611 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13612 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13613 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13614 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13615 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13616 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13617 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13618 ; AVX512BW-NEXT: retq
13620 ; AVX512VPOPCNTDQ-LABEL: ult_42_v8i64:
13621 ; AVX512VPOPCNTDQ: # %bb.0:
13622 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13623 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13624 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13625 ; AVX512VPOPCNTDQ-NEXT: retq
13627 ; BITALG-LABEL: ult_42_v8i64:
13629 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13630 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13631 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13632 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13633 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13634 ; BITALG-NEXT: retq
13635 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13636 %3 = icmp ult <8 x i64> %2, <i64 42, i64 42, i64 42, i64 42, i64 42, i64 42, i64 42, i64 42>
13637 %4 = sext <8 x i1> %3 to <8 x i64>
13641 define <8 x i64> @ugt_42_v8i64(<8 x i64> %0) {
13642 ; AVX512F-LABEL: ugt_42_v8i64:
13643 ; AVX512F: # %bb.0:
13644 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13645 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13646 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13647 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13648 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13649 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13650 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13651 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13652 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13653 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13654 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13655 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13656 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13657 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13658 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13659 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13660 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13661 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13662 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13663 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13664 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13665 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13666 ; AVX512F-NEXT: retq
13668 ; AVX512BW-LABEL: ugt_42_v8i64:
13669 ; AVX512BW: # %bb.0:
13670 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13671 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13672 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13673 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13674 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13675 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13676 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13677 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13678 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13679 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13680 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13681 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13682 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13683 ; AVX512BW-NEXT: retq
13685 ; AVX512VPOPCNTDQ-LABEL: ugt_42_v8i64:
13686 ; AVX512VPOPCNTDQ: # %bb.0:
13687 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13688 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13689 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13690 ; AVX512VPOPCNTDQ-NEXT: retq
13692 ; BITALG-LABEL: ugt_42_v8i64:
13694 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13695 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13696 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13697 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13698 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13699 ; BITALG-NEXT: retq
13700 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13701 %3 = icmp ugt <8 x i64> %2, <i64 42, i64 42, i64 42, i64 42, i64 42, i64 42, i64 42, i64 42>
13702 %4 = sext <8 x i1> %3 to <8 x i64>
13706 define <8 x i64> @ult_43_v8i64(<8 x i64> %0) {
13707 ; AVX512F-LABEL: ult_43_v8i64:
13708 ; AVX512F: # %bb.0:
13709 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13710 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13711 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13712 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13713 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13714 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13715 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13716 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13717 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13718 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13719 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13720 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13721 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13722 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13723 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13724 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13725 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13726 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13727 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13728 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13729 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13730 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13731 ; AVX512F-NEXT: retq
13733 ; AVX512BW-LABEL: ult_43_v8i64:
13734 ; AVX512BW: # %bb.0:
13735 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13736 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13737 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13738 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13739 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13740 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13741 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13742 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13743 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13744 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13745 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13746 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13747 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13748 ; AVX512BW-NEXT: retq
13750 ; AVX512VPOPCNTDQ-LABEL: ult_43_v8i64:
13751 ; AVX512VPOPCNTDQ: # %bb.0:
13752 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13753 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13754 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13755 ; AVX512VPOPCNTDQ-NEXT: retq
13757 ; BITALG-LABEL: ult_43_v8i64:
13759 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13760 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13761 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13762 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13763 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13764 ; BITALG-NEXT: retq
13765 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13766 %3 = icmp ult <8 x i64> %2, <i64 43, i64 43, i64 43, i64 43, i64 43, i64 43, i64 43, i64 43>
13767 %4 = sext <8 x i1> %3 to <8 x i64>
13771 define <8 x i64> @ugt_43_v8i64(<8 x i64> %0) {
13772 ; AVX512F-LABEL: ugt_43_v8i64:
13773 ; AVX512F: # %bb.0:
13774 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13775 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13776 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13777 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13778 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13779 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13780 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13781 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13782 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13783 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13784 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13785 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13786 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13787 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13788 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13789 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13790 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13791 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13792 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13793 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13794 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13795 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13796 ; AVX512F-NEXT: retq
13798 ; AVX512BW-LABEL: ugt_43_v8i64:
13799 ; AVX512BW: # %bb.0:
13800 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13801 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13802 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13803 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13804 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13805 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13806 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13807 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13808 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13809 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13810 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13811 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13812 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13813 ; AVX512BW-NEXT: retq
13815 ; AVX512VPOPCNTDQ-LABEL: ugt_43_v8i64:
13816 ; AVX512VPOPCNTDQ: # %bb.0:
13817 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13818 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13819 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13820 ; AVX512VPOPCNTDQ-NEXT: retq
13822 ; BITALG-LABEL: ugt_43_v8i64:
13824 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13825 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13826 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13827 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13828 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13829 ; BITALG-NEXT: retq
13830 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13831 %3 = icmp ugt <8 x i64> %2, <i64 43, i64 43, i64 43, i64 43, i64 43, i64 43, i64 43, i64 43>
13832 %4 = sext <8 x i1> %3 to <8 x i64>
13836 define <8 x i64> @ult_44_v8i64(<8 x i64> %0) {
13837 ; AVX512F-LABEL: ult_44_v8i64:
13838 ; AVX512F: # %bb.0:
13839 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13840 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13841 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13842 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13843 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13844 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13845 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13846 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13847 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13848 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13849 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13850 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13851 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13852 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13853 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13854 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13855 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13856 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13857 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13858 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13859 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13860 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13861 ; AVX512F-NEXT: retq
13863 ; AVX512BW-LABEL: ult_44_v8i64:
13864 ; AVX512BW: # %bb.0:
13865 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13866 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13867 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13868 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13869 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13870 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13871 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13872 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13873 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13874 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13875 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13876 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13877 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13878 ; AVX512BW-NEXT: retq
13880 ; AVX512VPOPCNTDQ-LABEL: ult_44_v8i64:
13881 ; AVX512VPOPCNTDQ: # %bb.0:
13882 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13883 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13884 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13885 ; AVX512VPOPCNTDQ-NEXT: retq
13887 ; BITALG-LABEL: ult_44_v8i64:
13889 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13890 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13891 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13892 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13893 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13894 ; BITALG-NEXT: retq
13895 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13896 %3 = icmp ult <8 x i64> %2, <i64 44, i64 44, i64 44, i64 44, i64 44, i64 44, i64 44, i64 44>
13897 %4 = sext <8 x i1> %3 to <8 x i64>
13901 define <8 x i64> @ugt_44_v8i64(<8 x i64> %0) {
13902 ; AVX512F-LABEL: ugt_44_v8i64:
13903 ; AVX512F: # %bb.0:
13904 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13905 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13906 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13907 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13908 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13909 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13910 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13911 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13912 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13913 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13914 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13915 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13916 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13917 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13918 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13919 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13920 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13921 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13922 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13923 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13924 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13925 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13926 ; AVX512F-NEXT: retq
13928 ; AVX512BW-LABEL: ugt_44_v8i64:
13929 ; AVX512BW: # %bb.0:
13930 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13931 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13932 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13933 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13934 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13935 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13936 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13937 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13938 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13939 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13940 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13941 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13942 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13943 ; AVX512BW-NEXT: retq
13945 ; AVX512VPOPCNTDQ-LABEL: ugt_44_v8i64:
13946 ; AVX512VPOPCNTDQ: # %bb.0:
13947 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13948 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13949 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13950 ; AVX512VPOPCNTDQ-NEXT: retq
13952 ; BITALG-LABEL: ugt_44_v8i64:
13954 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13955 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13956 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13957 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13958 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13959 ; BITALG-NEXT: retq
13960 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13961 %3 = icmp ugt <8 x i64> %2, <i64 44, i64 44, i64 44, i64 44, i64 44, i64 44, i64 44, i64 44>
13962 %4 = sext <8 x i1> %3 to <8 x i64>
13966 define <8 x i64> @ult_45_v8i64(<8 x i64> %0) {
13967 ; AVX512F-LABEL: ult_45_v8i64:
13968 ; AVX512F: # %bb.0:
13969 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13970 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13971 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13972 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13973 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
13974 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13975 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13976 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13977 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13978 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13979 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13980 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13981 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13982 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13983 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13984 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13985 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13986 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13987 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13988 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13989 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13990 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13991 ; AVX512F-NEXT: retq
13993 ; AVX512BW-LABEL: ult_45_v8i64:
13994 ; AVX512BW: # %bb.0:
13995 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13996 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13997 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13998 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
13999 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14000 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14001 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14002 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14003 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14004 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14005 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14006 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14007 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14008 ; AVX512BW-NEXT: retq
14010 ; AVX512VPOPCNTDQ-LABEL: ult_45_v8i64:
14011 ; AVX512VPOPCNTDQ: # %bb.0:
14012 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14013 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14014 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14015 ; AVX512VPOPCNTDQ-NEXT: retq
14017 ; BITALG-LABEL: ult_45_v8i64:
14019 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14020 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14021 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14022 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14023 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14024 ; BITALG-NEXT: retq
14025 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14026 %3 = icmp ult <8 x i64> %2, <i64 45, i64 45, i64 45, i64 45, i64 45, i64 45, i64 45, i64 45>
14027 %4 = sext <8 x i1> %3 to <8 x i64>
14031 define <8 x i64> @ugt_45_v8i64(<8 x i64> %0) {
14032 ; AVX512F-LABEL: ugt_45_v8i64:
14033 ; AVX512F: # %bb.0:
14034 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14035 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14036 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14037 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14038 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14039 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14040 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14041 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14042 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14043 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14044 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14045 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14046 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14047 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14048 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14049 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14050 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14051 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14052 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14053 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14054 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14055 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14056 ; AVX512F-NEXT: retq
14058 ; AVX512BW-LABEL: ugt_45_v8i64:
14059 ; AVX512BW: # %bb.0:
14060 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14061 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14062 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14063 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14064 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14065 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14066 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14067 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14068 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14069 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14070 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14071 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14072 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14073 ; AVX512BW-NEXT: retq
14075 ; AVX512VPOPCNTDQ-LABEL: ugt_45_v8i64:
14076 ; AVX512VPOPCNTDQ: # %bb.0:
14077 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14078 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14079 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14080 ; AVX512VPOPCNTDQ-NEXT: retq
14082 ; BITALG-LABEL: ugt_45_v8i64:
14084 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14085 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14086 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14087 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14088 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14089 ; BITALG-NEXT: retq
14090 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14091 %3 = icmp ugt <8 x i64> %2, <i64 45, i64 45, i64 45, i64 45, i64 45, i64 45, i64 45, i64 45>
14092 %4 = sext <8 x i1> %3 to <8 x i64>
14096 define <8 x i64> @ult_46_v8i64(<8 x i64> %0) {
14097 ; AVX512F-LABEL: ult_46_v8i64:
14098 ; AVX512F: # %bb.0:
14099 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14100 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14101 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14102 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14103 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14104 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14105 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14106 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14107 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14108 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14109 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14110 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14111 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14112 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14113 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14114 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14115 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14116 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14117 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14118 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14119 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14120 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14121 ; AVX512F-NEXT: retq
14123 ; AVX512BW-LABEL: ult_46_v8i64:
14124 ; AVX512BW: # %bb.0:
14125 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14126 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14127 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14128 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14129 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14130 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14131 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14132 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14133 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14134 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14135 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14136 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14137 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14138 ; AVX512BW-NEXT: retq
14140 ; AVX512VPOPCNTDQ-LABEL: ult_46_v8i64:
14141 ; AVX512VPOPCNTDQ: # %bb.0:
14142 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14143 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14144 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14145 ; AVX512VPOPCNTDQ-NEXT: retq
14147 ; BITALG-LABEL: ult_46_v8i64:
14149 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14150 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14151 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14152 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14153 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14154 ; BITALG-NEXT: retq
14155 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14156 %3 = icmp ult <8 x i64> %2, <i64 46, i64 46, i64 46, i64 46, i64 46, i64 46, i64 46, i64 46>
14157 %4 = sext <8 x i1> %3 to <8 x i64>
14161 define <8 x i64> @ugt_46_v8i64(<8 x i64> %0) {
14162 ; AVX512F-LABEL: ugt_46_v8i64:
14163 ; AVX512F: # %bb.0:
14164 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14165 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14166 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14167 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14168 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14169 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14170 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14171 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14172 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14173 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14174 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14175 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14176 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14177 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14178 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14179 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14180 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14181 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14182 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14183 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14184 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14185 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14186 ; AVX512F-NEXT: retq
14188 ; AVX512BW-LABEL: ugt_46_v8i64:
14189 ; AVX512BW: # %bb.0:
14190 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14191 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14192 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14193 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14194 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14195 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14196 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14197 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14198 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14199 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14200 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14201 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14202 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14203 ; AVX512BW-NEXT: retq
14205 ; AVX512VPOPCNTDQ-LABEL: ugt_46_v8i64:
14206 ; AVX512VPOPCNTDQ: # %bb.0:
14207 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14208 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14209 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14210 ; AVX512VPOPCNTDQ-NEXT: retq
14212 ; BITALG-LABEL: ugt_46_v8i64:
14214 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14215 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14216 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14217 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14218 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14219 ; BITALG-NEXT: retq
14220 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14221 %3 = icmp ugt <8 x i64> %2, <i64 46, i64 46, i64 46, i64 46, i64 46, i64 46, i64 46, i64 46>
14222 %4 = sext <8 x i1> %3 to <8 x i64>
14226 define <8 x i64> @ult_47_v8i64(<8 x i64> %0) {
14227 ; AVX512F-LABEL: ult_47_v8i64:
14228 ; AVX512F: # %bb.0:
14229 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14230 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14231 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14232 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14233 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14234 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14235 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14236 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14237 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14238 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14239 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14240 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14241 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14242 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14243 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14244 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14245 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14246 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14247 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14248 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14249 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14250 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14251 ; AVX512F-NEXT: retq
14253 ; AVX512BW-LABEL: ult_47_v8i64:
14254 ; AVX512BW: # %bb.0:
14255 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14256 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14257 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14258 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14259 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14260 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14261 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14262 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14263 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14264 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14265 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14266 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14267 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14268 ; AVX512BW-NEXT: retq
14270 ; AVX512VPOPCNTDQ-LABEL: ult_47_v8i64:
14271 ; AVX512VPOPCNTDQ: # %bb.0:
14272 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14273 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14274 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14275 ; AVX512VPOPCNTDQ-NEXT: retq
14277 ; BITALG-LABEL: ult_47_v8i64:
14279 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14280 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14281 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14282 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14283 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14284 ; BITALG-NEXT: retq
14285 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14286 %3 = icmp ult <8 x i64> %2, <i64 47, i64 47, i64 47, i64 47, i64 47, i64 47, i64 47, i64 47>
14287 %4 = sext <8 x i1> %3 to <8 x i64>
14291 define <8 x i64> @ugt_47_v8i64(<8 x i64> %0) {
14292 ; AVX512F-LABEL: ugt_47_v8i64:
14293 ; AVX512F: # %bb.0:
14294 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14295 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14296 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14297 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14298 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14299 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14300 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14301 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14302 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14303 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14304 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14305 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14306 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14307 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14308 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14309 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14310 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14311 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14312 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14313 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14314 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14315 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14316 ; AVX512F-NEXT: retq
14318 ; AVX512BW-LABEL: ugt_47_v8i64:
14319 ; AVX512BW: # %bb.0:
14320 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14321 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14322 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14323 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14324 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14325 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14326 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14327 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14328 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14329 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14330 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14331 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14332 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14333 ; AVX512BW-NEXT: retq
14335 ; AVX512VPOPCNTDQ-LABEL: ugt_47_v8i64:
14336 ; AVX512VPOPCNTDQ: # %bb.0:
14337 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14338 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14339 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14340 ; AVX512VPOPCNTDQ-NEXT: retq
14342 ; BITALG-LABEL: ugt_47_v8i64:
14344 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14345 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14346 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14347 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14348 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14349 ; BITALG-NEXT: retq
14350 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14351 %3 = icmp ugt <8 x i64> %2, <i64 47, i64 47, i64 47, i64 47, i64 47, i64 47, i64 47, i64 47>
14352 %4 = sext <8 x i1> %3 to <8 x i64>
14356 define <8 x i64> @ult_48_v8i64(<8 x i64> %0) {
14357 ; AVX512F-LABEL: ult_48_v8i64:
14358 ; AVX512F: # %bb.0:
14359 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14360 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14361 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14362 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14363 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14364 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14365 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14366 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14367 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14368 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14369 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14370 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14371 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14372 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14373 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14374 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14375 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14376 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14377 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14378 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14379 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14380 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14381 ; AVX512F-NEXT: retq
14383 ; AVX512BW-LABEL: ult_48_v8i64:
14384 ; AVX512BW: # %bb.0:
14385 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14386 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14387 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14388 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14389 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14390 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14391 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14392 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14393 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14394 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14395 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14396 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14397 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14398 ; AVX512BW-NEXT: retq
14400 ; AVX512VPOPCNTDQ-LABEL: ult_48_v8i64:
14401 ; AVX512VPOPCNTDQ: # %bb.0:
14402 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14403 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14404 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14405 ; AVX512VPOPCNTDQ-NEXT: retq
14407 ; BITALG-LABEL: ult_48_v8i64:
14409 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14410 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14411 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14412 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14413 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14414 ; BITALG-NEXT: retq
14415 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14416 %3 = icmp ult <8 x i64> %2, <i64 48, i64 48, i64 48, i64 48, i64 48, i64 48, i64 48, i64 48>
14417 %4 = sext <8 x i1> %3 to <8 x i64>
14421 define <8 x i64> @ugt_48_v8i64(<8 x i64> %0) {
14422 ; AVX512F-LABEL: ugt_48_v8i64:
14423 ; AVX512F: # %bb.0:
14424 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14425 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14426 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14427 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14428 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14429 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14430 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14431 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14432 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14433 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14434 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14435 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14436 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14437 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14438 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14439 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14440 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14441 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14442 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14443 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14444 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14445 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14446 ; AVX512F-NEXT: retq
14448 ; AVX512BW-LABEL: ugt_48_v8i64:
14449 ; AVX512BW: # %bb.0:
14450 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14451 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14452 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14453 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14454 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14455 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14456 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14457 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14458 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14459 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14460 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14461 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14462 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14463 ; AVX512BW-NEXT: retq
14465 ; AVX512VPOPCNTDQ-LABEL: ugt_48_v8i64:
14466 ; AVX512VPOPCNTDQ: # %bb.0:
14467 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14468 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14469 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14470 ; AVX512VPOPCNTDQ-NEXT: retq
14472 ; BITALG-LABEL: ugt_48_v8i64:
14474 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14475 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14476 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14477 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14478 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14479 ; BITALG-NEXT: retq
14480 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14481 %3 = icmp ugt <8 x i64> %2, <i64 48, i64 48, i64 48, i64 48, i64 48, i64 48, i64 48, i64 48>
14482 %4 = sext <8 x i1> %3 to <8 x i64>
14486 define <8 x i64> @ult_49_v8i64(<8 x i64> %0) {
14487 ; AVX512F-LABEL: ult_49_v8i64:
14488 ; AVX512F: # %bb.0:
14489 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14490 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14491 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14492 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14493 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14494 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14495 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14496 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14497 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14498 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14499 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14500 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14501 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14502 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14503 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14504 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14505 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14506 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14507 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14508 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14509 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14510 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14511 ; AVX512F-NEXT: retq
14513 ; AVX512BW-LABEL: ult_49_v8i64:
14514 ; AVX512BW: # %bb.0:
14515 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14516 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14517 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14518 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14519 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14520 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14521 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14522 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14523 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14524 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14525 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14526 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14527 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14528 ; AVX512BW-NEXT: retq
14530 ; AVX512VPOPCNTDQ-LABEL: ult_49_v8i64:
14531 ; AVX512VPOPCNTDQ: # %bb.0:
14532 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14533 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14534 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14535 ; AVX512VPOPCNTDQ-NEXT: retq
14537 ; BITALG-LABEL: ult_49_v8i64:
14539 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14540 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14541 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14542 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14543 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14544 ; BITALG-NEXT: retq
14545 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14546 %3 = icmp ult <8 x i64> %2, <i64 49, i64 49, i64 49, i64 49, i64 49, i64 49, i64 49, i64 49>
14547 %4 = sext <8 x i1> %3 to <8 x i64>
14551 define <8 x i64> @ugt_49_v8i64(<8 x i64> %0) {
14552 ; AVX512F-LABEL: ugt_49_v8i64:
14553 ; AVX512F: # %bb.0:
14554 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14555 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14556 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14557 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14558 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14559 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14560 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14561 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14562 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14563 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14564 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14565 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14566 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14567 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14568 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14569 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14570 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14571 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14572 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14573 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14574 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14575 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14576 ; AVX512F-NEXT: retq
14578 ; AVX512BW-LABEL: ugt_49_v8i64:
14579 ; AVX512BW: # %bb.0:
14580 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14581 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14582 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14583 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14584 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14585 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14586 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14587 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14588 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14589 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14590 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14591 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14592 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14593 ; AVX512BW-NEXT: retq
14595 ; AVX512VPOPCNTDQ-LABEL: ugt_49_v8i64:
14596 ; AVX512VPOPCNTDQ: # %bb.0:
14597 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14598 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14599 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14600 ; AVX512VPOPCNTDQ-NEXT: retq
14602 ; BITALG-LABEL: ugt_49_v8i64:
14604 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14605 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14606 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14607 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14608 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14609 ; BITALG-NEXT: retq
14610 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14611 %3 = icmp ugt <8 x i64> %2, <i64 49, i64 49, i64 49, i64 49, i64 49, i64 49, i64 49, i64 49>
14612 %4 = sext <8 x i1> %3 to <8 x i64>
14616 define <8 x i64> @ult_50_v8i64(<8 x i64> %0) {
14617 ; AVX512F-LABEL: ult_50_v8i64:
14618 ; AVX512F: # %bb.0:
14619 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14620 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14621 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14622 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14623 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14624 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14625 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14626 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14627 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14628 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14629 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14630 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14631 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14632 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14633 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14634 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14635 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14636 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14637 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14638 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14639 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14640 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14641 ; AVX512F-NEXT: retq
14643 ; AVX512BW-LABEL: ult_50_v8i64:
14644 ; AVX512BW: # %bb.0:
14645 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14646 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14647 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14648 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14649 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14650 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14651 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14652 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14653 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14654 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14655 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14656 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14657 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14658 ; AVX512BW-NEXT: retq
14660 ; AVX512VPOPCNTDQ-LABEL: ult_50_v8i64:
14661 ; AVX512VPOPCNTDQ: # %bb.0:
14662 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14663 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14664 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14665 ; AVX512VPOPCNTDQ-NEXT: retq
14667 ; BITALG-LABEL: ult_50_v8i64:
14669 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14670 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14671 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14672 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14673 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14674 ; BITALG-NEXT: retq
14675 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14676 %3 = icmp ult <8 x i64> %2, <i64 50, i64 50, i64 50, i64 50, i64 50, i64 50, i64 50, i64 50>
14677 %4 = sext <8 x i1> %3 to <8 x i64>
14681 define <8 x i64> @ugt_50_v8i64(<8 x i64> %0) {
14682 ; AVX512F-LABEL: ugt_50_v8i64:
14683 ; AVX512F: # %bb.0:
14684 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14685 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14686 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14687 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14688 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14689 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14690 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14691 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14692 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14693 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14694 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14695 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14696 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14697 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14698 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14699 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14700 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14701 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14702 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14703 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14704 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14705 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14706 ; AVX512F-NEXT: retq
14708 ; AVX512BW-LABEL: ugt_50_v8i64:
14709 ; AVX512BW: # %bb.0:
14710 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14711 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14712 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14713 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14714 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14715 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14716 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14717 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14718 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14719 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14720 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14721 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14722 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14723 ; AVX512BW-NEXT: retq
14725 ; AVX512VPOPCNTDQ-LABEL: ugt_50_v8i64:
14726 ; AVX512VPOPCNTDQ: # %bb.0:
14727 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14728 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14729 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14730 ; AVX512VPOPCNTDQ-NEXT: retq
14732 ; BITALG-LABEL: ugt_50_v8i64:
14734 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14735 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14736 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14737 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14738 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14739 ; BITALG-NEXT: retq
14740 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14741 %3 = icmp ugt <8 x i64> %2, <i64 50, i64 50, i64 50, i64 50, i64 50, i64 50, i64 50, i64 50>
14742 %4 = sext <8 x i1> %3 to <8 x i64>
14746 define <8 x i64> @ult_51_v8i64(<8 x i64> %0) {
14747 ; AVX512F-LABEL: ult_51_v8i64:
14748 ; AVX512F: # %bb.0:
14749 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14750 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14751 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14752 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14753 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14754 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14755 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14756 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14757 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14758 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14759 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14760 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14761 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14762 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14763 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14764 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14765 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14766 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14767 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14768 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14769 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14770 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14771 ; AVX512F-NEXT: retq
14773 ; AVX512BW-LABEL: ult_51_v8i64:
14774 ; AVX512BW: # %bb.0:
14775 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14776 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14777 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14778 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14779 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14780 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14781 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14782 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14783 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14784 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14785 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14786 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14787 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14788 ; AVX512BW-NEXT: retq
14790 ; AVX512VPOPCNTDQ-LABEL: ult_51_v8i64:
14791 ; AVX512VPOPCNTDQ: # %bb.0:
14792 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14793 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14794 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14795 ; AVX512VPOPCNTDQ-NEXT: retq
14797 ; BITALG-LABEL: ult_51_v8i64:
14799 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14800 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14801 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14802 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14803 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14804 ; BITALG-NEXT: retq
14805 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14806 %3 = icmp ult <8 x i64> %2, <i64 51, i64 51, i64 51, i64 51, i64 51, i64 51, i64 51, i64 51>
14807 %4 = sext <8 x i1> %3 to <8 x i64>
14811 define <8 x i64> @ugt_51_v8i64(<8 x i64> %0) {
14812 ; AVX512F-LABEL: ugt_51_v8i64:
14813 ; AVX512F: # %bb.0:
14814 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14815 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14816 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14817 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14818 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14819 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14820 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14821 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14822 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14823 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14824 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14825 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14826 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14827 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14828 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14829 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14830 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14831 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14832 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14833 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14834 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14835 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14836 ; AVX512F-NEXT: retq
14838 ; AVX512BW-LABEL: ugt_51_v8i64:
14839 ; AVX512BW: # %bb.0:
14840 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14841 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14842 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14843 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14844 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14845 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14846 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14847 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14848 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14849 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14850 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14851 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14852 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14853 ; AVX512BW-NEXT: retq
14855 ; AVX512VPOPCNTDQ-LABEL: ugt_51_v8i64:
14856 ; AVX512VPOPCNTDQ: # %bb.0:
14857 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14858 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14859 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14860 ; AVX512VPOPCNTDQ-NEXT: retq
14862 ; BITALG-LABEL: ugt_51_v8i64:
14864 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14865 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14866 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14867 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14868 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14869 ; BITALG-NEXT: retq
14870 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14871 %3 = icmp ugt <8 x i64> %2, <i64 51, i64 51, i64 51, i64 51, i64 51, i64 51, i64 51, i64 51>
14872 %4 = sext <8 x i1> %3 to <8 x i64>
14876 define <8 x i64> @ult_52_v8i64(<8 x i64> %0) {
14877 ; AVX512F-LABEL: ult_52_v8i64:
14878 ; AVX512F: # %bb.0:
14879 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14880 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14881 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14882 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14883 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14884 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14885 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14886 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14887 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14888 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14889 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14890 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14891 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14892 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14893 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14894 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14895 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14896 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14897 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14898 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14899 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14900 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14901 ; AVX512F-NEXT: retq
14903 ; AVX512BW-LABEL: ult_52_v8i64:
14904 ; AVX512BW: # %bb.0:
14905 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14906 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14907 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14908 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14909 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14910 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14911 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14912 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14913 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14914 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14915 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14916 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14917 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14918 ; AVX512BW-NEXT: retq
14920 ; AVX512VPOPCNTDQ-LABEL: ult_52_v8i64:
14921 ; AVX512VPOPCNTDQ: # %bb.0:
14922 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14923 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14924 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14925 ; AVX512VPOPCNTDQ-NEXT: retq
14927 ; BITALG-LABEL: ult_52_v8i64:
14929 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14930 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14931 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14932 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14933 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14934 ; BITALG-NEXT: retq
14935 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14936 %3 = icmp ult <8 x i64> %2, <i64 52, i64 52, i64 52, i64 52, i64 52, i64 52, i64 52, i64 52>
14937 %4 = sext <8 x i1> %3 to <8 x i64>
14941 define <8 x i64> @ugt_52_v8i64(<8 x i64> %0) {
14942 ; AVX512F-LABEL: ugt_52_v8i64:
14943 ; AVX512F: # %bb.0:
14944 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14945 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14946 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14947 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14948 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
14949 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14950 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14951 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14952 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14953 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14954 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14955 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14956 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14957 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14958 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14959 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14960 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14961 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14962 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14963 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14964 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14965 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14966 ; AVX512F-NEXT: retq
14968 ; AVX512BW-LABEL: ugt_52_v8i64:
14969 ; AVX512BW: # %bb.0:
14970 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14971 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14972 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14973 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
14974 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14975 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14976 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14977 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14978 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14979 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14980 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14981 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14982 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14983 ; AVX512BW-NEXT: retq
14985 ; AVX512VPOPCNTDQ-LABEL: ugt_52_v8i64:
14986 ; AVX512VPOPCNTDQ: # %bb.0:
14987 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14988 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14989 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14990 ; AVX512VPOPCNTDQ-NEXT: retq
14992 ; BITALG-LABEL: ugt_52_v8i64:
14994 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14995 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14996 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14997 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14998 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14999 ; BITALG-NEXT: retq
15000 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15001 %3 = icmp ugt <8 x i64> %2, <i64 52, i64 52, i64 52, i64 52, i64 52, i64 52, i64 52, i64 52>
15002 %4 = sext <8 x i1> %3 to <8 x i64>
15006 define <8 x i64> @ult_53_v8i64(<8 x i64> %0) {
15007 ; AVX512F-LABEL: ult_53_v8i64:
15008 ; AVX512F: # %bb.0:
15009 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15010 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15011 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15012 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15013 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15014 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15015 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15016 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15017 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15018 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15019 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15020 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15021 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15022 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15023 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15024 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15025 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15026 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15027 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15028 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15029 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15030 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15031 ; AVX512F-NEXT: retq
15033 ; AVX512BW-LABEL: ult_53_v8i64:
15034 ; AVX512BW: # %bb.0:
15035 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15036 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15037 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15038 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15039 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15040 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15041 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15042 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15043 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15044 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15045 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15046 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15047 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15048 ; AVX512BW-NEXT: retq
15050 ; AVX512VPOPCNTDQ-LABEL: ult_53_v8i64:
15051 ; AVX512VPOPCNTDQ: # %bb.0:
15052 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15053 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15054 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15055 ; AVX512VPOPCNTDQ-NEXT: retq
15057 ; BITALG-LABEL: ult_53_v8i64:
15059 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15060 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15061 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15062 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15063 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15064 ; BITALG-NEXT: retq
15065 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15066 %3 = icmp ult <8 x i64> %2, <i64 53, i64 53, i64 53, i64 53, i64 53, i64 53, i64 53, i64 53>
15067 %4 = sext <8 x i1> %3 to <8 x i64>
15071 define <8 x i64> @ugt_53_v8i64(<8 x i64> %0) {
15072 ; AVX512F-LABEL: ugt_53_v8i64:
15073 ; AVX512F: # %bb.0:
15074 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15075 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15076 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15077 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15078 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15079 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15080 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15081 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15082 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15083 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15084 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15085 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15086 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15087 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15088 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15089 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15090 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15091 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15092 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15093 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15094 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15095 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15096 ; AVX512F-NEXT: retq
15098 ; AVX512BW-LABEL: ugt_53_v8i64:
15099 ; AVX512BW: # %bb.0:
15100 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15101 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15102 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15103 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15104 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15105 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15106 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15107 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15108 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15109 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15110 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15111 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15112 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15113 ; AVX512BW-NEXT: retq
15115 ; AVX512VPOPCNTDQ-LABEL: ugt_53_v8i64:
15116 ; AVX512VPOPCNTDQ: # %bb.0:
15117 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15118 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15119 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15120 ; AVX512VPOPCNTDQ-NEXT: retq
15122 ; BITALG-LABEL: ugt_53_v8i64:
15124 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15125 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15126 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15127 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15128 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15129 ; BITALG-NEXT: retq
15130 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15131 %3 = icmp ugt <8 x i64> %2, <i64 53, i64 53, i64 53, i64 53, i64 53, i64 53, i64 53, i64 53>
15132 %4 = sext <8 x i1> %3 to <8 x i64>
15136 define <8 x i64> @ult_54_v8i64(<8 x i64> %0) {
15137 ; AVX512F-LABEL: ult_54_v8i64:
15138 ; AVX512F: # %bb.0:
15139 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15140 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15141 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15142 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15143 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15144 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15145 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15146 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15147 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15148 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15149 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15150 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15151 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15152 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15153 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15154 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15155 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15156 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15157 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15158 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15159 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15160 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15161 ; AVX512F-NEXT: retq
15163 ; AVX512BW-LABEL: ult_54_v8i64:
15164 ; AVX512BW: # %bb.0:
15165 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15166 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15167 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15168 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15169 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15170 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15171 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15172 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15173 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15174 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15175 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15176 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15177 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15178 ; AVX512BW-NEXT: retq
15180 ; AVX512VPOPCNTDQ-LABEL: ult_54_v8i64:
15181 ; AVX512VPOPCNTDQ: # %bb.0:
15182 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15183 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15184 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15185 ; AVX512VPOPCNTDQ-NEXT: retq
15187 ; BITALG-LABEL: ult_54_v8i64:
15189 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15190 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15191 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15192 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15193 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15194 ; BITALG-NEXT: retq
15195 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15196 %3 = icmp ult <8 x i64> %2, <i64 54, i64 54, i64 54, i64 54, i64 54, i64 54, i64 54, i64 54>
15197 %4 = sext <8 x i1> %3 to <8 x i64>
15201 define <8 x i64> @ugt_54_v8i64(<8 x i64> %0) {
15202 ; AVX512F-LABEL: ugt_54_v8i64:
15203 ; AVX512F: # %bb.0:
15204 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15205 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15206 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15207 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15208 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15209 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15210 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15211 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15212 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15213 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15214 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15215 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15216 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15217 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15218 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15219 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15220 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15221 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15222 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15223 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15224 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15225 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15226 ; AVX512F-NEXT: retq
15228 ; AVX512BW-LABEL: ugt_54_v8i64:
15229 ; AVX512BW: # %bb.0:
15230 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15231 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15232 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15233 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15234 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15235 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15236 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15237 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15238 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15239 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15240 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15241 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15242 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15243 ; AVX512BW-NEXT: retq
15245 ; AVX512VPOPCNTDQ-LABEL: ugt_54_v8i64:
15246 ; AVX512VPOPCNTDQ: # %bb.0:
15247 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15248 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15249 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15250 ; AVX512VPOPCNTDQ-NEXT: retq
15252 ; BITALG-LABEL: ugt_54_v8i64:
15254 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15255 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15256 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15257 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15258 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15259 ; BITALG-NEXT: retq
15260 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15261 %3 = icmp ugt <8 x i64> %2, <i64 54, i64 54, i64 54, i64 54, i64 54, i64 54, i64 54, i64 54>
15262 %4 = sext <8 x i1> %3 to <8 x i64>
15266 define <8 x i64> @ult_55_v8i64(<8 x i64> %0) {
15267 ; AVX512F-LABEL: ult_55_v8i64:
15268 ; AVX512F: # %bb.0:
15269 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15270 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15271 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15272 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15273 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15274 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15275 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15276 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15277 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15278 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15279 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15280 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15281 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15282 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15283 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15284 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15285 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15286 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15287 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15288 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15289 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15290 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15291 ; AVX512F-NEXT: retq
15293 ; AVX512BW-LABEL: ult_55_v8i64:
15294 ; AVX512BW: # %bb.0:
15295 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15296 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15297 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15298 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15299 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15300 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15301 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15302 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15303 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15304 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15305 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15306 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15307 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15308 ; AVX512BW-NEXT: retq
15310 ; AVX512VPOPCNTDQ-LABEL: ult_55_v8i64:
15311 ; AVX512VPOPCNTDQ: # %bb.0:
15312 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15313 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15314 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15315 ; AVX512VPOPCNTDQ-NEXT: retq
15317 ; BITALG-LABEL: ult_55_v8i64:
15319 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15320 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15321 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15322 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15323 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15324 ; BITALG-NEXT: retq
15325 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15326 %3 = icmp ult <8 x i64> %2, <i64 55, i64 55, i64 55, i64 55, i64 55, i64 55, i64 55, i64 55>
15327 %4 = sext <8 x i1> %3 to <8 x i64>
15331 define <8 x i64> @ugt_55_v8i64(<8 x i64> %0) {
15332 ; AVX512F-LABEL: ugt_55_v8i64:
15333 ; AVX512F: # %bb.0:
15334 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15335 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15336 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15337 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15338 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15339 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15340 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15341 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15342 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15343 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15344 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15345 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15346 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15347 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15348 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15349 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15350 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15351 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15352 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15353 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15354 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15355 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15356 ; AVX512F-NEXT: retq
15358 ; AVX512BW-LABEL: ugt_55_v8i64:
15359 ; AVX512BW: # %bb.0:
15360 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15361 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15362 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15363 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15364 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15365 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15366 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15367 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15368 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15369 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15370 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15371 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15372 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15373 ; AVX512BW-NEXT: retq
15375 ; AVX512VPOPCNTDQ-LABEL: ugt_55_v8i64:
15376 ; AVX512VPOPCNTDQ: # %bb.0:
15377 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15378 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15379 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15380 ; AVX512VPOPCNTDQ-NEXT: retq
15382 ; BITALG-LABEL: ugt_55_v8i64:
15384 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15385 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15386 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15387 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15388 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15389 ; BITALG-NEXT: retq
15390 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15391 %3 = icmp ugt <8 x i64> %2, <i64 55, i64 55, i64 55, i64 55, i64 55, i64 55, i64 55, i64 55>
15392 %4 = sext <8 x i1> %3 to <8 x i64>
15396 define <8 x i64> @ult_56_v8i64(<8 x i64> %0) {
15397 ; AVX512F-LABEL: ult_56_v8i64:
15398 ; AVX512F: # %bb.0:
15399 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15400 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15401 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15402 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15403 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15404 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15405 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15406 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15407 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15408 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15409 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15410 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15411 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15412 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15413 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15414 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15415 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15416 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15417 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15418 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15419 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15420 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15421 ; AVX512F-NEXT: retq
15423 ; AVX512BW-LABEL: ult_56_v8i64:
15424 ; AVX512BW: # %bb.0:
15425 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15426 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15427 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15428 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15429 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15430 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15431 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15432 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15433 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15434 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15435 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15436 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15437 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15438 ; AVX512BW-NEXT: retq
15440 ; AVX512VPOPCNTDQ-LABEL: ult_56_v8i64:
15441 ; AVX512VPOPCNTDQ: # %bb.0:
15442 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15443 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15444 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15445 ; AVX512VPOPCNTDQ-NEXT: retq
15447 ; BITALG-LABEL: ult_56_v8i64:
15449 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15450 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15451 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15452 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15453 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15454 ; BITALG-NEXT: retq
15455 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15456 %3 = icmp ult <8 x i64> %2, <i64 56, i64 56, i64 56, i64 56, i64 56, i64 56, i64 56, i64 56>
15457 %4 = sext <8 x i1> %3 to <8 x i64>
15461 define <8 x i64> @ugt_56_v8i64(<8 x i64> %0) {
15462 ; AVX512F-LABEL: ugt_56_v8i64:
15463 ; AVX512F: # %bb.0:
15464 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15465 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15466 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15467 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15468 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15469 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15470 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15471 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15472 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15473 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15474 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15475 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15476 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15477 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15478 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15479 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15480 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15481 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15482 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15483 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15484 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15485 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15486 ; AVX512F-NEXT: retq
15488 ; AVX512BW-LABEL: ugt_56_v8i64:
15489 ; AVX512BW: # %bb.0:
15490 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15491 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15492 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15493 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15494 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15495 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15496 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15497 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15498 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15499 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15500 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15501 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15502 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15503 ; AVX512BW-NEXT: retq
15505 ; AVX512VPOPCNTDQ-LABEL: ugt_56_v8i64:
15506 ; AVX512VPOPCNTDQ: # %bb.0:
15507 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15508 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15509 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15510 ; AVX512VPOPCNTDQ-NEXT: retq
15512 ; BITALG-LABEL: ugt_56_v8i64:
15514 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15515 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15516 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15517 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15518 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15519 ; BITALG-NEXT: retq
15520 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15521 %3 = icmp ugt <8 x i64> %2, <i64 56, i64 56, i64 56, i64 56, i64 56, i64 56, i64 56, i64 56>
15522 %4 = sext <8 x i1> %3 to <8 x i64>
15526 define <8 x i64> @ult_57_v8i64(<8 x i64> %0) {
15527 ; AVX512F-LABEL: ult_57_v8i64:
15528 ; AVX512F: # %bb.0:
15529 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15530 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15531 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15532 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15533 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15534 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15535 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15536 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15537 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15538 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15539 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15540 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15541 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15542 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15543 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15544 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15545 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15546 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15547 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15548 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15549 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15550 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15551 ; AVX512F-NEXT: retq
15553 ; AVX512BW-LABEL: ult_57_v8i64:
15554 ; AVX512BW: # %bb.0:
15555 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15556 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15557 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15558 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15559 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15560 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15561 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15562 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15563 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15564 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15565 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15566 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15567 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15568 ; AVX512BW-NEXT: retq
15570 ; AVX512VPOPCNTDQ-LABEL: ult_57_v8i64:
15571 ; AVX512VPOPCNTDQ: # %bb.0:
15572 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15573 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15574 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15575 ; AVX512VPOPCNTDQ-NEXT: retq
15577 ; BITALG-LABEL: ult_57_v8i64:
15579 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15580 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15581 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15582 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15583 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15584 ; BITALG-NEXT: retq
15585 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15586 %3 = icmp ult <8 x i64> %2, <i64 57, i64 57, i64 57, i64 57, i64 57, i64 57, i64 57, i64 57>
15587 %4 = sext <8 x i1> %3 to <8 x i64>
15591 define <8 x i64> @ugt_57_v8i64(<8 x i64> %0) {
15592 ; AVX512F-LABEL: ugt_57_v8i64:
15593 ; AVX512F: # %bb.0:
15594 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15595 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15596 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15597 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15598 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15599 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15600 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15601 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15602 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15603 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15604 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15605 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15606 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15607 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15608 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15609 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15610 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15611 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15612 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15613 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15614 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15615 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15616 ; AVX512F-NEXT: retq
15618 ; AVX512BW-LABEL: ugt_57_v8i64:
15619 ; AVX512BW: # %bb.0:
15620 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15621 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15622 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15623 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15624 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15625 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15626 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15627 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15628 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15629 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15630 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15631 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15632 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15633 ; AVX512BW-NEXT: retq
15635 ; AVX512VPOPCNTDQ-LABEL: ugt_57_v8i64:
15636 ; AVX512VPOPCNTDQ: # %bb.0:
15637 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15638 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15639 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15640 ; AVX512VPOPCNTDQ-NEXT: retq
15642 ; BITALG-LABEL: ugt_57_v8i64:
15644 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15645 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15646 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15647 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15648 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15649 ; BITALG-NEXT: retq
15650 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15651 %3 = icmp ugt <8 x i64> %2, <i64 57, i64 57, i64 57, i64 57, i64 57, i64 57, i64 57, i64 57>
15652 %4 = sext <8 x i1> %3 to <8 x i64>
15656 define <8 x i64> @ult_58_v8i64(<8 x i64> %0) {
15657 ; AVX512F-LABEL: ult_58_v8i64:
15658 ; AVX512F: # %bb.0:
15659 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15660 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15661 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15662 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15663 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15664 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15665 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15666 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15667 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15668 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15669 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15670 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15671 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15672 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15673 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15674 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15675 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15676 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15677 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15678 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15679 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15680 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15681 ; AVX512F-NEXT: retq
15683 ; AVX512BW-LABEL: ult_58_v8i64:
15684 ; AVX512BW: # %bb.0:
15685 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15686 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15687 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15688 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15689 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15690 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15691 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15692 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15693 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15694 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15695 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15696 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15697 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15698 ; AVX512BW-NEXT: retq
15700 ; AVX512VPOPCNTDQ-LABEL: ult_58_v8i64:
15701 ; AVX512VPOPCNTDQ: # %bb.0:
15702 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15703 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15704 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15705 ; AVX512VPOPCNTDQ-NEXT: retq
15707 ; BITALG-LABEL: ult_58_v8i64:
15709 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15710 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15711 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15712 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15713 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15714 ; BITALG-NEXT: retq
15715 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15716 %3 = icmp ult <8 x i64> %2, <i64 58, i64 58, i64 58, i64 58, i64 58, i64 58, i64 58, i64 58>
15717 %4 = sext <8 x i1> %3 to <8 x i64>
15721 define <8 x i64> @ugt_58_v8i64(<8 x i64> %0) {
15722 ; AVX512F-LABEL: ugt_58_v8i64:
15723 ; AVX512F: # %bb.0:
15724 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15725 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15726 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15727 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15728 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15729 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15730 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15731 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15732 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15733 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15734 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15735 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15736 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15737 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15738 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15739 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15740 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15741 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15742 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15743 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15744 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15745 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15746 ; AVX512F-NEXT: retq
15748 ; AVX512BW-LABEL: ugt_58_v8i64:
15749 ; AVX512BW: # %bb.0:
15750 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15751 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15752 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15753 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15754 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15755 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15756 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15757 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15758 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15759 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15760 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15761 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15762 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15763 ; AVX512BW-NEXT: retq
15765 ; AVX512VPOPCNTDQ-LABEL: ugt_58_v8i64:
15766 ; AVX512VPOPCNTDQ: # %bb.0:
15767 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15768 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15769 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15770 ; AVX512VPOPCNTDQ-NEXT: retq
15772 ; BITALG-LABEL: ugt_58_v8i64:
15774 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15775 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15776 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15777 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15778 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15779 ; BITALG-NEXT: retq
15780 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15781 %3 = icmp ugt <8 x i64> %2, <i64 58, i64 58, i64 58, i64 58, i64 58, i64 58, i64 58, i64 58>
15782 %4 = sext <8 x i1> %3 to <8 x i64>
15786 define <8 x i64> @ult_59_v8i64(<8 x i64> %0) {
15787 ; AVX512F-LABEL: ult_59_v8i64:
15788 ; AVX512F: # %bb.0:
15789 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15790 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15791 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15792 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15793 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15794 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15795 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15796 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15797 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15798 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15799 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15800 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15801 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15802 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15803 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15804 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15805 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15806 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15807 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15808 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15809 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15810 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15811 ; AVX512F-NEXT: retq
15813 ; AVX512BW-LABEL: ult_59_v8i64:
15814 ; AVX512BW: # %bb.0:
15815 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15816 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15817 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15818 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15819 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15820 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15821 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15822 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15823 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15824 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15825 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15826 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15827 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15828 ; AVX512BW-NEXT: retq
15830 ; AVX512VPOPCNTDQ-LABEL: ult_59_v8i64:
15831 ; AVX512VPOPCNTDQ: # %bb.0:
15832 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15833 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15834 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15835 ; AVX512VPOPCNTDQ-NEXT: retq
15837 ; BITALG-LABEL: ult_59_v8i64:
15839 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15840 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15841 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15842 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15843 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15844 ; BITALG-NEXT: retq
15845 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15846 %3 = icmp ult <8 x i64> %2, <i64 59, i64 59, i64 59, i64 59, i64 59, i64 59, i64 59, i64 59>
15847 %4 = sext <8 x i1> %3 to <8 x i64>
15851 define <8 x i64> @ugt_59_v8i64(<8 x i64> %0) {
15852 ; AVX512F-LABEL: ugt_59_v8i64:
15853 ; AVX512F: # %bb.0:
15854 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15855 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15856 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15857 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15858 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15859 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15860 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15861 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15862 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15863 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15864 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15865 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15866 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15867 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15868 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15869 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15870 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15871 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15872 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15873 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15874 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15875 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15876 ; AVX512F-NEXT: retq
15878 ; AVX512BW-LABEL: ugt_59_v8i64:
15879 ; AVX512BW: # %bb.0:
15880 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15881 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15882 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15883 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15884 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15885 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15886 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15887 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15888 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15889 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15890 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15891 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15892 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15893 ; AVX512BW-NEXT: retq
15895 ; AVX512VPOPCNTDQ-LABEL: ugt_59_v8i64:
15896 ; AVX512VPOPCNTDQ: # %bb.0:
15897 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15898 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15899 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15900 ; AVX512VPOPCNTDQ-NEXT: retq
15902 ; BITALG-LABEL: ugt_59_v8i64:
15904 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15905 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15906 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15907 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15908 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15909 ; BITALG-NEXT: retq
15910 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15911 %3 = icmp ugt <8 x i64> %2, <i64 59, i64 59, i64 59, i64 59, i64 59, i64 59, i64 59, i64 59>
15912 %4 = sext <8 x i1> %3 to <8 x i64>
15916 define <8 x i64> @ult_60_v8i64(<8 x i64> %0) {
15917 ; AVX512F-LABEL: ult_60_v8i64:
15918 ; AVX512F: # %bb.0:
15919 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15920 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15921 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15922 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15923 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15924 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15925 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15926 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15927 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15928 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15929 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15930 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15931 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15932 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15933 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15934 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15935 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15936 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15937 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15938 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15939 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15940 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15941 ; AVX512F-NEXT: retq
15943 ; AVX512BW-LABEL: ult_60_v8i64:
15944 ; AVX512BW: # %bb.0:
15945 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15946 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15947 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15948 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
15949 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15950 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15951 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15952 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15953 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15954 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15955 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15956 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15957 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15958 ; AVX512BW-NEXT: retq
15960 ; AVX512VPOPCNTDQ-LABEL: ult_60_v8i64:
15961 ; AVX512VPOPCNTDQ: # %bb.0:
15962 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15963 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15964 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15965 ; AVX512VPOPCNTDQ-NEXT: retq
15967 ; BITALG-LABEL: ult_60_v8i64:
15969 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15970 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15971 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15972 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15973 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15974 ; BITALG-NEXT: retq
15975 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15976 %3 = icmp ult <8 x i64> %2, <i64 60, i64 60, i64 60, i64 60, i64 60, i64 60, i64 60, i64 60>
15977 %4 = sext <8 x i1> %3 to <8 x i64>
15981 define <8 x i64> @ugt_60_v8i64(<8 x i64> %0) {
15982 ; AVX512F-LABEL: ugt_60_v8i64:
15983 ; AVX512F: # %bb.0:
15984 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15985 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15986 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15987 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15988 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
15989 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15990 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15991 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15992 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15993 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15994 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15995 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15996 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15997 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15998 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15999 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
16000 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
16001 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
16002 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
16003 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
16004 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16005 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16006 ; AVX512F-NEXT: retq
16008 ; AVX512BW-LABEL: ugt_60_v8i64:
16009 ; AVX512BW: # %bb.0:
16010 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16011 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
16012 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16013 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
16014 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
16015 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
16016 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
16017 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
16018 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
16019 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
16020 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16021 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16022 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16023 ; AVX512BW-NEXT: retq
16025 ; AVX512VPOPCNTDQ-LABEL: ugt_60_v8i64:
16026 ; AVX512VPOPCNTDQ: # %bb.0:
16027 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16028 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16029 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16030 ; AVX512VPOPCNTDQ-NEXT: retq
16032 ; BITALG-LABEL: ugt_60_v8i64:
16034 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
16035 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16036 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16037 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16038 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16039 ; BITALG-NEXT: retq
16040 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
16041 %3 = icmp ugt <8 x i64> %2, <i64 60, i64 60, i64 60, i64 60, i64 60, i64 60, i64 60, i64 60>
16042 %4 = sext <8 x i1> %3 to <8 x i64>
16046 define <8 x i64> @ult_61_v8i64(<8 x i64> %0) {
16047 ; AVX512F-LABEL: ult_61_v8i64:
16048 ; AVX512F: # %bb.0:
16049 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
16050 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16051 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
16052 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16053 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
16054 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
16055 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
16056 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
16057 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
16058 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
16059 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
16060 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
16061 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
16062 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
16063 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
16064 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
16065 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
16066 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
16067 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
16068 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
16069 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16070 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16071 ; AVX512F-NEXT: retq
16073 ; AVX512BW-LABEL: ult_61_v8i64:
16074 ; AVX512BW: # %bb.0:
16075 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16076 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
16077 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16078 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
16079 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
16080 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
16081 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
16082 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
16083 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
16084 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
16085 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16086 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16087 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16088 ; AVX512BW-NEXT: retq
16090 ; AVX512VPOPCNTDQ-LABEL: ult_61_v8i64:
16091 ; AVX512VPOPCNTDQ: # %bb.0:
16092 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16093 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16094 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16095 ; AVX512VPOPCNTDQ-NEXT: retq
16097 ; BITALG-LABEL: ult_61_v8i64:
16099 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
16100 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16101 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16102 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16103 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16104 ; BITALG-NEXT: retq
16105 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
16106 %3 = icmp ult <8 x i64> %2, <i64 61, i64 61, i64 61, i64 61, i64 61, i64 61, i64 61, i64 61>
16107 %4 = sext <8 x i1> %3 to <8 x i64>
16111 define <8 x i64> @ugt_61_v8i64(<8 x i64> %0) {
16112 ; AVX512F-LABEL: ugt_61_v8i64:
16113 ; AVX512F: # %bb.0:
16114 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
16115 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16116 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
16117 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16118 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
16119 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
16120 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
16121 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
16122 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
16123 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
16124 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
16125 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
16126 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
16127 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
16128 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
16129 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
16130 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
16131 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
16132 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
16133 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
16134 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16135 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16136 ; AVX512F-NEXT: retq
16138 ; AVX512BW-LABEL: ugt_61_v8i64:
16139 ; AVX512BW: # %bb.0:
16140 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16141 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
16142 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16143 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
16144 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
16145 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
16146 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
16147 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
16148 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
16149 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
16150 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16151 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16152 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16153 ; AVX512BW-NEXT: retq
16155 ; AVX512VPOPCNTDQ-LABEL: ugt_61_v8i64:
16156 ; AVX512VPOPCNTDQ: # %bb.0:
16157 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16158 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16159 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16160 ; AVX512VPOPCNTDQ-NEXT: retq
16162 ; BITALG-LABEL: ugt_61_v8i64:
16164 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
16165 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16166 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16167 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16168 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16169 ; BITALG-NEXT: retq
16170 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
16171 %3 = icmp ugt <8 x i64> %2, <i64 61, i64 61, i64 61, i64 61, i64 61, i64 61, i64 61, i64 61>
16172 %4 = sext <8 x i1> %3 to <8 x i64>
16176 define <8 x i64> @ult_62_v8i64(<8 x i64> %0) {
16177 ; AVX512F-LABEL: ult_62_v8i64:
16178 ; AVX512F: # %bb.0:
16179 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
16180 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16181 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
16182 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16183 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
16184 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
16185 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
16186 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
16187 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
16188 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
16189 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
16190 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
16191 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
16192 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
16193 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
16194 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
16195 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
16196 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
16197 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
16198 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
16199 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16200 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16201 ; AVX512F-NEXT: retq
16203 ; AVX512BW-LABEL: ult_62_v8i64:
16204 ; AVX512BW: # %bb.0:
16205 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16206 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
16207 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16208 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
16209 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
16210 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
16211 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
16212 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
16213 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
16214 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
16215 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16216 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16217 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16218 ; AVX512BW-NEXT: retq
16220 ; AVX512VPOPCNTDQ-LABEL: ult_62_v8i64:
16221 ; AVX512VPOPCNTDQ: # %bb.0:
16222 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16223 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16224 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16225 ; AVX512VPOPCNTDQ-NEXT: retq
16227 ; BITALG-LABEL: ult_62_v8i64:
16229 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
16230 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16231 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16232 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16233 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16234 ; BITALG-NEXT: retq
16235 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
16236 %3 = icmp ult <8 x i64> %2, <i64 62, i64 62, i64 62, i64 62, i64 62, i64 62, i64 62, i64 62>
16237 %4 = sext <8 x i1> %3 to <8 x i64>
16241 define <8 x i64> @ugt_62_v8i64(<8 x i64> %0) {
16242 ; AVX512F-LABEL: ugt_62_v8i64:
16243 ; AVX512F: # %bb.0:
16244 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
16245 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16246 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
16247 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16248 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
16249 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
16250 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
16251 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
16252 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
16253 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
16254 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
16255 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
16256 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
16257 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
16258 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
16259 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
16260 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
16261 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
16262 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
16263 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
16264 ; AVX512F-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16265 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16266 ; AVX512F-NEXT: retq
16268 ; AVX512BW-LABEL: ugt_62_v8i64:
16269 ; AVX512BW: # %bb.0:
16270 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16271 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
16272 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16273 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
16274 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
16275 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
16276 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
16277 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
16278 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
16279 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
16280 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16281 ; AVX512BW-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16282 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16283 ; AVX512BW-NEXT: retq
16285 ; AVX512VPOPCNTDQ-LABEL: ugt_62_v8i64:
16286 ; AVX512VPOPCNTDQ: # %bb.0:
16287 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16288 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16289 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16290 ; AVX512VPOPCNTDQ-NEXT: retq
16292 ; BITALG-LABEL: ugt_62_v8i64:
16294 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
16295 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16296 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16297 ; BITALG-NEXT: vpcmpgtq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16298 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16299 ; BITALG-NEXT: retq
16300 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
16301 %3 = icmp ugt <8 x i64> %2, <i64 62, i64 62, i64 62, i64 62, i64 62, i64 62, i64 62, i64 62>
16302 %4 = sext <8 x i1> %3 to <8 x i64>
16306 define <8 x i64> @ult_63_v8i64(<8 x i64> %0) {
16307 ; AVX512F-LABEL: ult_63_v8i64:
16308 ; AVX512F: # %bb.0:
16309 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
16310 ; AVX512F-NEXT: vpbroadcastb {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16311 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
16312 ; AVX512F-NEXT: vbroadcasti128 {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16313 ; AVX512F-NEXT: # ymm4 = mem[0,1,0,1]
16314 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
16315 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
16316 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
16317 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
16318 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
16319 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
16320 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
16321 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
16322 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
16323 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
16324 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
16325 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
16326 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
16327 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
16328 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
16329 ; AVX512F-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16330 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16331 ; AVX512F-NEXT: retq
16333 ; AVX512BW-LABEL: ult_63_v8i64:
16334 ; AVX512BW: # %bb.0:
16335 ; AVX512BW-NEXT: vpbroadcastb {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16336 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
16337 ; AVX512BW-NEXT: vbroadcasti32x4 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16338 ; AVX512BW-NEXT: # zmm3 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
16339 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
16340 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
16341 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
16342 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
16343 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
16344 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
16345 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16346 ; AVX512BW-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16347 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16348 ; AVX512BW-NEXT: retq
16350 ; AVX512VPOPCNTDQ-LABEL: ult_63_v8i64:
16351 ; AVX512VPOPCNTDQ: # %bb.0:
16352 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16353 ; AVX512VPOPCNTDQ-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16354 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16355 ; AVX512VPOPCNTDQ-NEXT: retq
16357 ; BITALG-LABEL: ult_63_v8i64:
16359 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
16360 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16361 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
16362 ; BITALG-NEXT: vpcmpltq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
16363 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
16364 ; BITALG-NEXT: retq
16365 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
16366 %3 = icmp ult <8 x i64> %2, <i64 63, i64 63, i64 63, i64 63, i64 63, i64 63, i64 63, i64 63>
16367 %4 = sext <8 x i1> %3 to <8 x i64>
16371 declare <64 x i8> @llvm.ctpop.v64i8(<64 x i8>)
16372 declare <32 x i16> @llvm.ctpop.v32i16(<32 x i16>)
16373 declare <16 x i32> @llvm.ctpop.v16i32(<16 x i32>)
16374 declare <8 x i64> @llvm.ctpop.v8i64(<8 x i64>)