1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=AVX1
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefix=AVX2
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vpopcntdq | FileCheck %s --check-prefix=AVX512VPOPCNTDQ
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vpopcntdq,+avx512vl | FileCheck %s --check-prefix=AVX512VPOPCNTDQVL
6 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bitalg | FileCheck %s --check-prefix=BITALG_NOVLX
7 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bitalg,+avx512vl | FileCheck %s --check-prefix=BITALG
10 define <32 x i8> @ugt_1_v32i8(<32 x i8> %0) {
11 ; AVX1-LABEL: ugt_1_v32i8:
13 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
14 ; AVX1-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
15 ; AVX1-NEXT: vpaddb %xmm2, %xmm1, %xmm3
16 ; AVX1-NEXT: vpand %xmm3, %xmm1, %xmm1
17 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
18 ; AVX1-NEXT: vpcmpeqb %xmm3, %xmm1, %xmm1
19 ; AVX1-NEXT: vpxor %xmm2, %xmm1, %xmm1
20 ; AVX1-NEXT: vpaddb %xmm2, %xmm0, %xmm4
21 ; AVX1-NEXT: vpand %xmm4, %xmm0, %xmm0
22 ; AVX1-NEXT: vpcmpeqb %xmm3, %xmm0, %xmm0
23 ; AVX1-NEXT: vpxor %xmm2, %xmm0, %xmm0
24 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
27 ; AVX2-LABEL: ugt_1_v32i8:
29 ; AVX2-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
30 ; AVX2-NEXT: vpaddb %ymm1, %ymm0, %ymm2
31 ; AVX2-NEXT: vpand %ymm2, %ymm0, %ymm0
32 ; AVX2-NEXT: vpxor %xmm2, %xmm2, %xmm2
33 ; AVX2-NEXT: vpcmpeqb %ymm2, %ymm0, %ymm0
34 ; AVX2-NEXT: vpxor %ymm1, %ymm0, %ymm0
37 ; AVX512VPOPCNTDQ-LABEL: ugt_1_v32i8:
38 ; AVX512VPOPCNTDQ: # %bb.0:
39 ; AVX512VPOPCNTDQ-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
40 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm1, %ymm0, %ymm1
41 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
42 ; AVX512VPOPCNTDQ-NEXT: vpxor %xmm1, %xmm1, %xmm1
43 ; AVX512VPOPCNTDQ-NEXT: vpcmpeqb %ymm1, %ymm0, %ymm0
44 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
45 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
46 ; AVX512VPOPCNTDQ-NEXT: retq
48 ; AVX512VPOPCNTDQVL-LABEL: ugt_1_v32i8:
49 ; AVX512VPOPCNTDQVL: # %bb.0:
50 ; AVX512VPOPCNTDQVL-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
51 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm1, %ymm0, %ymm1
52 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
53 ; AVX512VPOPCNTDQVL-NEXT: vpxor %xmm1, %xmm1, %xmm1
54 ; AVX512VPOPCNTDQVL-NEXT: vpcmpeqb %ymm1, %ymm0, %ymm0
55 ; AVX512VPOPCNTDQVL-NEXT: vpternlogq $15, %ymm0, %ymm0, %ymm0
56 ; AVX512VPOPCNTDQVL-NEXT: retq
58 ; BITALG_NOVLX-LABEL: ugt_1_v32i8:
59 ; BITALG_NOVLX: # %bb.0:
60 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
61 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
62 ; BITALG_NOVLX-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
63 ; BITALG_NOVLX-NEXT: retq
65 ; BITALG-LABEL: ugt_1_v32i8:
67 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
68 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
70 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
71 %3 = icmp ugt <32 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>
72 %4 = sext <32 x i1> %3 to <32 x i8>
76 define <32 x i8> @ult_2_v32i8(<32 x i8> %0) {
77 ; AVX1-LABEL: ult_2_v32i8:
79 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
80 ; AVX1-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
81 ; AVX1-NEXT: vpaddb %xmm2, %xmm1, %xmm3
82 ; AVX1-NEXT: vpand %xmm3, %xmm1, %xmm1
83 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
84 ; AVX1-NEXT: vpcmpeqb %xmm3, %xmm1, %xmm1
85 ; AVX1-NEXT: vpaddb %xmm2, %xmm0, %xmm2
86 ; AVX1-NEXT: vpand %xmm2, %xmm0, %xmm0
87 ; AVX1-NEXT: vpcmpeqb %xmm3, %xmm0, %xmm0
88 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
91 ; AVX2-LABEL: ult_2_v32i8:
93 ; AVX2-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
94 ; AVX2-NEXT: vpaddb %ymm1, %ymm0, %ymm1
95 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
96 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
97 ; AVX2-NEXT: vpcmpeqb %ymm1, %ymm0, %ymm0
100 ; AVX512VPOPCNTDQ-LABEL: ult_2_v32i8:
101 ; AVX512VPOPCNTDQ: # %bb.0:
102 ; AVX512VPOPCNTDQ-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
103 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm1, %ymm0, %ymm1
104 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
105 ; AVX512VPOPCNTDQ-NEXT: vpxor %xmm1, %xmm1, %xmm1
106 ; AVX512VPOPCNTDQ-NEXT: vpcmpeqb %ymm1, %ymm0, %ymm0
107 ; AVX512VPOPCNTDQ-NEXT: retq
109 ; AVX512VPOPCNTDQVL-LABEL: ult_2_v32i8:
110 ; AVX512VPOPCNTDQVL: # %bb.0:
111 ; AVX512VPOPCNTDQVL-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
112 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm1, %ymm0, %ymm1
113 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
114 ; AVX512VPOPCNTDQVL-NEXT: vpxor %xmm1, %xmm1, %xmm1
115 ; AVX512VPOPCNTDQVL-NEXT: vpcmpeqb %ymm1, %ymm0, %ymm0
116 ; AVX512VPOPCNTDQVL-NEXT: retq
118 ; BITALG_NOVLX-LABEL: ult_2_v32i8:
119 ; BITALG_NOVLX: # %bb.0:
120 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
121 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
122 ; BITALG_NOVLX-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]
123 ; BITALG_NOVLX-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
124 ; BITALG_NOVLX-NEXT: retq
126 ; BITALG-LABEL: ult_2_v32i8:
128 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
129 ; BITALG-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]
130 ; BITALG-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
132 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
133 %3 = icmp ult <32 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>
134 %4 = sext <32 x i1> %3 to <32 x i8>
138 define <32 x i8> @ugt_2_v32i8(<32 x i8> %0) {
139 ; AVX1-LABEL: ugt_2_v32i8:
141 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
142 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
143 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
144 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
145 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
146 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
147 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
148 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
149 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
150 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
151 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
152 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
153 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
154 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
155 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
156 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
157 ; AVX1-NEXT: vpcmpgtb %xmm1, %xmm0, %xmm0
158 ; AVX1-NEXT: vpcmpgtb %xmm1, %xmm2, %xmm1
159 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
162 ; AVX2-LABEL: ugt_2_v32i8:
164 ; AVX2-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]
165 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
166 ; AVX2-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]
167 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
168 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
169 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
170 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
171 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
172 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
173 ; AVX2-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
176 ; AVX512VPOPCNTDQ-LABEL: ugt_2_v32i8:
177 ; AVX512VPOPCNTDQ: # %bb.0:
178 ; AVX512VPOPCNTDQ-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]
179 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm2
180 ; AVX512VPOPCNTDQ-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]
181 ; AVX512VPOPCNTDQ-NEXT: # ymm3 = mem[0,1,0,1]
182 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm2, %ymm3, %ymm2
183 ; AVX512VPOPCNTDQ-NEXT: vpsrlw $4, %ymm0, %ymm0
184 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
185 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm0, %ymm3, %ymm0
186 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm2, %ymm0, %ymm0
187 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
188 ; AVX512VPOPCNTDQ-NEXT: retq
190 ; AVX512VPOPCNTDQVL-LABEL: ugt_2_v32i8:
191 ; AVX512VPOPCNTDQVL: # %bb.0:
192 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
193 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm2
194 ; AVX512VPOPCNTDQVL-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]
195 ; AVX512VPOPCNTDQVL-NEXT: # ymm3 = mem[0,1,0,1]
196 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm2, %ymm3, %ymm2
197 ; AVX512VPOPCNTDQVL-NEXT: vpsrlw $4, %ymm0, %ymm0
198 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
199 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm0, %ymm3, %ymm0
200 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm2, %ymm0, %ymm0
201 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
202 ; AVX512VPOPCNTDQVL-NEXT: retq
204 ; BITALG_NOVLX-LABEL: ugt_2_v32i8:
205 ; BITALG_NOVLX: # %bb.0:
206 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
207 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
208 ; BITALG_NOVLX-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
209 ; BITALG_NOVLX-NEXT: retq
211 ; BITALG-LABEL: ugt_2_v32i8:
213 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
214 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
216 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
217 %3 = icmp ugt <32 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>
218 %4 = sext <32 x i1> %3 to <32 x i8>
222 define <32 x i8> @ult_3_v32i8(<32 x i8> %0) {
223 ; AVX1-LABEL: ult_3_v32i8:
225 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
226 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
227 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
228 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
229 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
230 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
231 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
232 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
233 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
234 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
235 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
236 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
237 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
238 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
239 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
240 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
241 ; AVX1-NEXT: vpcmpgtb %xmm0, %xmm1, %xmm0
242 ; AVX1-NEXT: vpcmpgtb %xmm2, %xmm1, %xmm1
243 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
246 ; AVX2-LABEL: ult_3_v32i8:
248 ; AVX2-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]
249 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
250 ; AVX2-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]
251 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
252 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
253 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
254 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
255 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
256 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
257 ; AVX2-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]
258 ; AVX2-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
261 ; AVX512VPOPCNTDQ-LABEL: ult_3_v32i8:
262 ; AVX512VPOPCNTDQ: # %bb.0:
263 ; AVX512VPOPCNTDQ-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]
264 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm2
265 ; AVX512VPOPCNTDQ-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]
266 ; AVX512VPOPCNTDQ-NEXT: # ymm3 = mem[0,1,0,1]
267 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm2, %ymm3, %ymm2
268 ; AVX512VPOPCNTDQ-NEXT: vpsrlw $4, %ymm0, %ymm0
269 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
270 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm0, %ymm3, %ymm0
271 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm2, %ymm0, %ymm0
272 ; AVX512VPOPCNTDQ-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]
273 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
274 ; AVX512VPOPCNTDQ-NEXT: retq
276 ; AVX512VPOPCNTDQVL-LABEL: ult_3_v32i8:
277 ; AVX512VPOPCNTDQVL: # %bb.0:
278 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
279 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm2
280 ; AVX512VPOPCNTDQVL-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]
281 ; AVX512VPOPCNTDQVL-NEXT: # ymm3 = mem[0,1,0,1]
282 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm2, %ymm3, %ymm2
283 ; AVX512VPOPCNTDQVL-NEXT: vpsrlw $4, %ymm0, %ymm0
284 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
285 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm0, %ymm3, %ymm0
286 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm2, %ymm0, %ymm0
287 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
288 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
289 ; AVX512VPOPCNTDQVL-NEXT: retq
291 ; BITALG_NOVLX-LABEL: ult_3_v32i8:
292 ; BITALG_NOVLX: # %bb.0:
293 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
294 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
295 ; BITALG_NOVLX-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]
296 ; BITALG_NOVLX-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
297 ; BITALG_NOVLX-NEXT: retq
299 ; BITALG-LABEL: ult_3_v32i8:
301 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
302 ; BITALG-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]
303 ; BITALG-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
305 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
306 %3 = icmp ult <32 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>
307 %4 = sext <32 x i1> %3 to <32 x i8>
311 define <32 x i8> @ugt_3_v32i8(<32 x i8> %0) {
312 ; AVX1-LABEL: ugt_3_v32i8:
314 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
315 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
316 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
317 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
318 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
319 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
320 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
321 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
322 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
323 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
324 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
325 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
326 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
327 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
328 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
329 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
330 ; AVX1-NEXT: vpcmpgtb %xmm1, %xmm0, %xmm0
331 ; AVX1-NEXT: vpcmpgtb %xmm1, %xmm2, %xmm1
332 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
335 ; AVX2-LABEL: ugt_3_v32i8:
337 ; AVX2-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]
338 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
339 ; AVX2-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]
340 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
341 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
342 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
343 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
344 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
345 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
346 ; AVX2-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
349 ; AVX512VPOPCNTDQ-LABEL: ugt_3_v32i8:
350 ; AVX512VPOPCNTDQ: # %bb.0:
351 ; AVX512VPOPCNTDQ-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]
352 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm2
353 ; AVX512VPOPCNTDQ-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]
354 ; AVX512VPOPCNTDQ-NEXT: # ymm3 = mem[0,1,0,1]
355 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm2, %ymm3, %ymm2
356 ; AVX512VPOPCNTDQ-NEXT: vpsrlw $4, %ymm0, %ymm0
357 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
358 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm0, %ymm3, %ymm0
359 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm2, %ymm0, %ymm0
360 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
361 ; AVX512VPOPCNTDQ-NEXT: retq
363 ; AVX512VPOPCNTDQVL-LABEL: ugt_3_v32i8:
364 ; AVX512VPOPCNTDQVL: # %bb.0:
365 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
366 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm2
367 ; AVX512VPOPCNTDQVL-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]
368 ; AVX512VPOPCNTDQVL-NEXT: # ymm3 = mem[0,1,0,1]
369 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm2, %ymm3, %ymm2
370 ; AVX512VPOPCNTDQVL-NEXT: vpsrlw $4, %ymm0, %ymm0
371 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
372 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm0, %ymm3, %ymm0
373 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm2, %ymm0, %ymm0
374 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
375 ; AVX512VPOPCNTDQVL-NEXT: retq
377 ; BITALG_NOVLX-LABEL: ugt_3_v32i8:
378 ; BITALG_NOVLX: # %bb.0:
379 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
380 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
381 ; BITALG_NOVLX-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
382 ; BITALG_NOVLX-NEXT: retq
384 ; BITALG-LABEL: ugt_3_v32i8:
386 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
387 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
389 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
390 %3 = icmp ugt <32 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>
391 %4 = sext <32 x i1> %3 to <32 x i8>
395 define <32 x i8> @ult_4_v32i8(<32 x i8> %0) {
396 ; AVX1-LABEL: ult_4_v32i8:
398 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
399 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
400 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
401 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
402 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
403 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
404 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
405 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
406 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
407 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
408 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
409 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
410 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
411 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
412 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
413 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
414 ; AVX1-NEXT: vpcmpgtb %xmm0, %xmm1, %xmm0
415 ; AVX1-NEXT: vpcmpgtb %xmm2, %xmm1, %xmm1
416 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
419 ; AVX2-LABEL: ult_4_v32i8:
421 ; AVX2-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]
422 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
423 ; AVX2-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]
424 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
425 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
426 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
427 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
428 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
429 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
430 ; AVX2-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]
431 ; AVX2-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
434 ; AVX512VPOPCNTDQ-LABEL: ult_4_v32i8:
435 ; AVX512VPOPCNTDQ: # %bb.0:
436 ; AVX512VPOPCNTDQ-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]
437 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm2
438 ; AVX512VPOPCNTDQ-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]
439 ; AVX512VPOPCNTDQ-NEXT: # ymm3 = mem[0,1,0,1]
440 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm2, %ymm3, %ymm2
441 ; AVX512VPOPCNTDQ-NEXT: vpsrlw $4, %ymm0, %ymm0
442 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
443 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm0, %ymm3, %ymm0
444 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm2, %ymm0, %ymm0
445 ; AVX512VPOPCNTDQ-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]
446 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
447 ; AVX512VPOPCNTDQ-NEXT: retq
449 ; AVX512VPOPCNTDQVL-LABEL: ult_4_v32i8:
450 ; AVX512VPOPCNTDQVL: # %bb.0:
451 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
452 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm2
453 ; AVX512VPOPCNTDQVL-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]
454 ; AVX512VPOPCNTDQVL-NEXT: # ymm3 = mem[0,1,0,1]
455 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm2, %ymm3, %ymm2
456 ; AVX512VPOPCNTDQVL-NEXT: vpsrlw $4, %ymm0, %ymm0
457 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
458 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm0, %ymm3, %ymm0
459 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm2, %ymm0, %ymm0
460 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
461 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
462 ; AVX512VPOPCNTDQVL-NEXT: retq
464 ; BITALG_NOVLX-LABEL: ult_4_v32i8:
465 ; BITALG_NOVLX: # %bb.0:
466 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
467 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
468 ; BITALG_NOVLX-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]
469 ; BITALG_NOVLX-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
470 ; BITALG_NOVLX-NEXT: retq
472 ; BITALG-LABEL: ult_4_v32i8:
474 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
475 ; BITALG-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]
476 ; BITALG-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
478 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
479 %3 = icmp ult <32 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>
480 %4 = sext <32 x i1> %3 to <32 x i8>
484 define <32 x i8> @ugt_4_v32i8(<32 x i8> %0) {
485 ; AVX1-LABEL: ugt_4_v32i8:
487 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
488 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
489 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
490 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
491 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
492 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
493 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
494 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
495 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
496 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
497 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
498 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
499 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
500 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
501 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
502 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
503 ; AVX1-NEXT: vpcmpgtb %xmm1, %xmm0, %xmm0
504 ; AVX1-NEXT: vpcmpgtb %xmm1, %xmm2, %xmm1
505 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
508 ; AVX2-LABEL: ugt_4_v32i8:
510 ; AVX2-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]
511 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
512 ; AVX2-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]
513 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
514 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
515 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
516 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
517 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
518 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
519 ; AVX2-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
522 ; AVX512VPOPCNTDQ-LABEL: ugt_4_v32i8:
523 ; AVX512VPOPCNTDQ: # %bb.0:
524 ; AVX512VPOPCNTDQ-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]
525 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm2
526 ; AVX512VPOPCNTDQ-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]
527 ; AVX512VPOPCNTDQ-NEXT: # ymm3 = mem[0,1,0,1]
528 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm2, %ymm3, %ymm2
529 ; AVX512VPOPCNTDQ-NEXT: vpsrlw $4, %ymm0, %ymm0
530 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
531 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm0, %ymm3, %ymm0
532 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm2, %ymm0, %ymm0
533 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
534 ; AVX512VPOPCNTDQ-NEXT: retq
536 ; AVX512VPOPCNTDQVL-LABEL: ugt_4_v32i8:
537 ; AVX512VPOPCNTDQVL: # %bb.0:
538 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
539 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm2
540 ; AVX512VPOPCNTDQVL-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]
541 ; AVX512VPOPCNTDQVL-NEXT: # ymm3 = mem[0,1,0,1]
542 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm2, %ymm3, %ymm2
543 ; AVX512VPOPCNTDQVL-NEXT: vpsrlw $4, %ymm0, %ymm0
544 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
545 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm0, %ymm3, %ymm0
546 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm2, %ymm0, %ymm0
547 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
548 ; AVX512VPOPCNTDQVL-NEXT: retq
550 ; BITALG_NOVLX-LABEL: ugt_4_v32i8:
551 ; BITALG_NOVLX: # %bb.0:
552 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
553 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
554 ; BITALG_NOVLX-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
555 ; BITALG_NOVLX-NEXT: retq
557 ; BITALG-LABEL: ugt_4_v32i8:
559 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
560 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
562 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
563 %3 = icmp ugt <32 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>
564 %4 = sext <32 x i1> %3 to <32 x i8>
568 define <32 x i8> @ult_5_v32i8(<32 x i8> %0) {
569 ; AVX1-LABEL: ult_5_v32i8:
571 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
572 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
573 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
574 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
575 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
576 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
577 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
578 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
579 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
580 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
581 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
582 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
583 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
584 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
585 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
586 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
587 ; AVX1-NEXT: vpcmpgtb %xmm0, %xmm1, %xmm0
588 ; AVX1-NEXT: vpcmpgtb %xmm2, %xmm1, %xmm1
589 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
592 ; AVX2-LABEL: ult_5_v32i8:
594 ; AVX2-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]
595 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
596 ; AVX2-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]
597 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
598 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
599 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
600 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
601 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
602 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
603 ; AVX2-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]
604 ; AVX2-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
607 ; AVX512VPOPCNTDQ-LABEL: ult_5_v32i8:
608 ; AVX512VPOPCNTDQ: # %bb.0:
609 ; AVX512VPOPCNTDQ-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]
610 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm2
611 ; AVX512VPOPCNTDQ-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]
612 ; AVX512VPOPCNTDQ-NEXT: # ymm3 = mem[0,1,0,1]
613 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm2, %ymm3, %ymm2
614 ; AVX512VPOPCNTDQ-NEXT: vpsrlw $4, %ymm0, %ymm0
615 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
616 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm0, %ymm3, %ymm0
617 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm2, %ymm0, %ymm0
618 ; AVX512VPOPCNTDQ-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]
619 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
620 ; AVX512VPOPCNTDQ-NEXT: retq
622 ; AVX512VPOPCNTDQVL-LABEL: ult_5_v32i8:
623 ; AVX512VPOPCNTDQVL: # %bb.0:
624 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
625 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm2
626 ; AVX512VPOPCNTDQVL-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]
627 ; AVX512VPOPCNTDQVL-NEXT: # ymm3 = mem[0,1,0,1]
628 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm2, %ymm3, %ymm2
629 ; AVX512VPOPCNTDQVL-NEXT: vpsrlw $4, %ymm0, %ymm0
630 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
631 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm0, %ymm3, %ymm0
632 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm2, %ymm0, %ymm0
633 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
634 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
635 ; AVX512VPOPCNTDQVL-NEXT: retq
637 ; BITALG_NOVLX-LABEL: ult_5_v32i8:
638 ; BITALG_NOVLX: # %bb.0:
639 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
640 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
641 ; BITALG_NOVLX-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]
642 ; BITALG_NOVLX-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
643 ; BITALG_NOVLX-NEXT: retq
645 ; BITALG-LABEL: ult_5_v32i8:
647 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
648 ; BITALG-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]
649 ; BITALG-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
651 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
652 %3 = icmp ult <32 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>
653 %4 = sext <32 x i1> %3 to <32 x i8>
657 define <32 x i8> @ugt_5_v32i8(<32 x i8> %0) {
658 ; AVX1-LABEL: ugt_5_v32i8:
660 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
661 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
662 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
663 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
664 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
665 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
666 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
667 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
668 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
669 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
670 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
671 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
672 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
673 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
674 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
675 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
676 ; AVX1-NEXT: vpcmpgtb %xmm1, %xmm0, %xmm0
677 ; AVX1-NEXT: vpcmpgtb %xmm1, %xmm2, %xmm1
678 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
681 ; AVX2-LABEL: ugt_5_v32i8:
683 ; AVX2-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]
684 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
685 ; AVX2-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]
686 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
687 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
688 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
689 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
690 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
691 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
692 ; AVX2-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
695 ; AVX512VPOPCNTDQ-LABEL: ugt_5_v32i8:
696 ; AVX512VPOPCNTDQ: # %bb.0:
697 ; AVX512VPOPCNTDQ-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]
698 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm2
699 ; AVX512VPOPCNTDQ-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]
700 ; AVX512VPOPCNTDQ-NEXT: # ymm3 = mem[0,1,0,1]
701 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm2, %ymm3, %ymm2
702 ; AVX512VPOPCNTDQ-NEXT: vpsrlw $4, %ymm0, %ymm0
703 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
704 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm0, %ymm3, %ymm0
705 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm2, %ymm0, %ymm0
706 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
707 ; AVX512VPOPCNTDQ-NEXT: retq
709 ; AVX512VPOPCNTDQVL-LABEL: ugt_5_v32i8:
710 ; AVX512VPOPCNTDQVL: # %bb.0:
711 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
712 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm2
713 ; AVX512VPOPCNTDQVL-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]
714 ; AVX512VPOPCNTDQVL-NEXT: # ymm3 = mem[0,1,0,1]
715 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm2, %ymm3, %ymm2
716 ; AVX512VPOPCNTDQVL-NEXT: vpsrlw $4, %ymm0, %ymm0
717 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
718 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm0, %ymm3, %ymm0
719 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm2, %ymm0, %ymm0
720 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
721 ; AVX512VPOPCNTDQVL-NEXT: retq
723 ; BITALG_NOVLX-LABEL: ugt_5_v32i8:
724 ; BITALG_NOVLX: # %bb.0:
725 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
726 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
727 ; BITALG_NOVLX-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
728 ; BITALG_NOVLX-NEXT: retq
730 ; BITALG-LABEL: ugt_5_v32i8:
732 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
733 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
735 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
736 %3 = icmp ugt <32 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>
737 %4 = sext <32 x i1> %3 to <32 x i8>
741 define <32 x i8> @ult_6_v32i8(<32 x i8> %0) {
742 ; AVX1-LABEL: ult_6_v32i8:
744 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
745 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
746 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
747 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
748 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
749 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
750 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
751 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
752 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
753 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
754 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
755 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
756 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
757 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
758 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
759 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
760 ; AVX1-NEXT: vpcmpgtb %xmm0, %xmm1, %xmm0
761 ; AVX1-NEXT: vpcmpgtb %xmm2, %xmm1, %xmm1
762 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
765 ; AVX2-LABEL: ult_6_v32i8:
767 ; AVX2-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]
768 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
769 ; AVX2-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]
770 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
771 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
772 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
773 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
774 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
775 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
776 ; AVX2-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]
777 ; AVX2-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
780 ; AVX512VPOPCNTDQ-LABEL: ult_6_v32i8:
781 ; AVX512VPOPCNTDQ: # %bb.0:
782 ; AVX512VPOPCNTDQ-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]
783 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm2
784 ; AVX512VPOPCNTDQ-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]
785 ; AVX512VPOPCNTDQ-NEXT: # ymm3 = mem[0,1,0,1]
786 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm2, %ymm3, %ymm2
787 ; AVX512VPOPCNTDQ-NEXT: vpsrlw $4, %ymm0, %ymm0
788 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
789 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm0, %ymm3, %ymm0
790 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm2, %ymm0, %ymm0
791 ; AVX512VPOPCNTDQ-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]
792 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
793 ; AVX512VPOPCNTDQ-NEXT: retq
795 ; AVX512VPOPCNTDQVL-LABEL: ult_6_v32i8:
796 ; AVX512VPOPCNTDQVL: # %bb.0:
797 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
798 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm2
799 ; AVX512VPOPCNTDQVL-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]
800 ; AVX512VPOPCNTDQVL-NEXT: # ymm3 = mem[0,1,0,1]
801 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm2, %ymm3, %ymm2
802 ; AVX512VPOPCNTDQVL-NEXT: vpsrlw $4, %ymm0, %ymm0
803 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
804 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm0, %ymm3, %ymm0
805 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm2, %ymm0, %ymm0
806 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
807 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
808 ; AVX512VPOPCNTDQVL-NEXT: retq
810 ; BITALG_NOVLX-LABEL: ult_6_v32i8:
811 ; BITALG_NOVLX: # %bb.0:
812 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
813 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
814 ; BITALG_NOVLX-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]
815 ; BITALG_NOVLX-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
816 ; BITALG_NOVLX-NEXT: retq
818 ; BITALG-LABEL: ult_6_v32i8:
820 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
821 ; BITALG-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]
822 ; BITALG-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
824 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
825 %3 = icmp ult <32 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>
826 %4 = sext <32 x i1> %3 to <32 x i8>
830 define <32 x i8> @ugt_6_v32i8(<32 x i8> %0) {
831 ; AVX1-LABEL: ugt_6_v32i8:
833 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
834 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
835 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
836 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
837 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
838 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
839 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
840 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
841 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
842 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
843 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
844 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
845 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
846 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
847 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
848 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
849 ; AVX1-NEXT: vpcmpgtb %xmm1, %xmm0, %xmm0
850 ; AVX1-NEXT: vpcmpgtb %xmm1, %xmm2, %xmm1
851 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
854 ; AVX2-LABEL: ugt_6_v32i8:
856 ; AVX2-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 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
858 ; AVX2-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 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
860 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
861 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
862 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
863 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
864 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
865 ; AVX2-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
868 ; AVX512VPOPCNTDQ-LABEL: ugt_6_v32i8:
869 ; AVX512VPOPCNTDQ: # %bb.0:
870 ; AVX512VPOPCNTDQ-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]
871 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm2
872 ; AVX512VPOPCNTDQ-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]
873 ; AVX512VPOPCNTDQ-NEXT: # ymm3 = mem[0,1,0,1]
874 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm2, %ymm3, %ymm2
875 ; AVX512VPOPCNTDQ-NEXT: vpsrlw $4, %ymm0, %ymm0
876 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
877 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm0, %ymm3, %ymm0
878 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm2, %ymm0, %ymm0
879 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
880 ; AVX512VPOPCNTDQ-NEXT: retq
882 ; AVX512VPOPCNTDQVL-LABEL: ugt_6_v32i8:
883 ; AVX512VPOPCNTDQVL: # %bb.0:
884 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
885 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm2
886 ; AVX512VPOPCNTDQVL-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]
887 ; AVX512VPOPCNTDQVL-NEXT: # ymm3 = mem[0,1,0,1]
888 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm2, %ymm3, %ymm2
889 ; AVX512VPOPCNTDQVL-NEXT: vpsrlw $4, %ymm0, %ymm0
890 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
891 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm0, %ymm3, %ymm0
892 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm2, %ymm0, %ymm0
893 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
894 ; AVX512VPOPCNTDQVL-NEXT: retq
896 ; BITALG_NOVLX-LABEL: ugt_6_v32i8:
897 ; BITALG_NOVLX: # %bb.0:
898 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
899 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
900 ; BITALG_NOVLX-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
901 ; BITALG_NOVLX-NEXT: retq
903 ; BITALG-LABEL: ugt_6_v32i8:
905 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
906 ; BITALG-NEXT: vpcmpgtb {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
908 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
909 %3 = icmp ugt <32 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>
910 %4 = sext <32 x i1> %3 to <32 x i8>
914 define <32 x i8> @ult_7_v32i8(<32 x i8> %0) {
915 ; AVX1-LABEL: ult_7_v32i8:
917 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
918 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
919 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
920 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
921 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
922 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
923 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
924 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
925 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
926 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
927 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
928 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
929 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
930 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
931 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
932 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
933 ; AVX1-NEXT: vpcmpgtb %xmm0, %xmm1, %xmm0
934 ; AVX1-NEXT: vpcmpgtb %xmm2, %xmm1, %xmm1
935 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
938 ; AVX2-LABEL: ult_7_v32i8:
940 ; AVX2-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]
941 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
942 ; AVX2-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]
943 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
944 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
945 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
946 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
947 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
948 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
949 ; AVX2-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]
950 ; AVX2-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
953 ; AVX512VPOPCNTDQ-LABEL: ult_7_v32i8:
954 ; AVX512VPOPCNTDQ: # %bb.0:
955 ; AVX512VPOPCNTDQ-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]
956 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm2
957 ; AVX512VPOPCNTDQ-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]
958 ; AVX512VPOPCNTDQ-NEXT: # ymm3 = mem[0,1,0,1]
959 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm2, %ymm3, %ymm2
960 ; AVX512VPOPCNTDQ-NEXT: vpsrlw $4, %ymm0, %ymm0
961 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
962 ; AVX512VPOPCNTDQ-NEXT: vpshufb %ymm0, %ymm3, %ymm0
963 ; AVX512VPOPCNTDQ-NEXT: vpaddb %ymm2, %ymm0, %ymm0
964 ; AVX512VPOPCNTDQ-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]
965 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
966 ; AVX512VPOPCNTDQ-NEXT: retq
968 ; AVX512VPOPCNTDQVL-LABEL: ult_7_v32i8:
969 ; AVX512VPOPCNTDQVL: # %bb.0:
970 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
971 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm2
972 ; AVX512VPOPCNTDQVL-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]
973 ; AVX512VPOPCNTDQVL-NEXT: # ymm3 = mem[0,1,0,1]
974 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm2, %ymm3, %ymm2
975 ; AVX512VPOPCNTDQVL-NEXT: vpsrlw $4, %ymm0, %ymm0
976 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
977 ; AVX512VPOPCNTDQVL-NEXT: vpshufb %ymm0, %ymm3, %ymm0
978 ; AVX512VPOPCNTDQVL-NEXT: vpaddb %ymm2, %ymm0, %ymm0
979 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} 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]
980 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
981 ; AVX512VPOPCNTDQVL-NEXT: retq
983 ; BITALG_NOVLX-LABEL: ult_7_v32i8:
984 ; BITALG_NOVLX: # %bb.0:
985 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
986 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
987 ; BITALG_NOVLX-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]
988 ; BITALG_NOVLX-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
989 ; BITALG_NOVLX-NEXT: retq
991 ; BITALG-LABEL: ult_7_v32i8:
993 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
994 ; BITALG-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]
995 ; BITALG-NEXT: vpcmpgtb %ymm0, %ymm1, %ymm0
997 %2 = tail call <32 x i8> @llvm.ctpop.v32i8(<32 x i8> %0)
998 %3 = icmp ult <32 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>
999 %4 = sext <32 x i1> %3 to <32 x i8>
1003 define <16 x i16> @ugt_1_v16i16(<16 x i16> %0) {
1004 ; AVX1-LABEL: ugt_1_v16i16:
1006 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
1007 ; AVX1-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
1008 ; AVX1-NEXT: vpaddw %xmm2, %xmm1, %xmm3
1009 ; AVX1-NEXT: vpand %xmm3, %xmm1, %xmm1
1010 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
1011 ; AVX1-NEXT: vpcmpeqw %xmm3, %xmm1, %xmm1
1012 ; AVX1-NEXT: vpxor %xmm2, %xmm1, %xmm1
1013 ; AVX1-NEXT: vpaddw %xmm2, %xmm0, %xmm4
1014 ; AVX1-NEXT: vpand %xmm4, %xmm0, %xmm0
1015 ; AVX1-NEXT: vpcmpeqw %xmm3, %xmm0, %xmm0
1016 ; AVX1-NEXT: vpxor %xmm2, %xmm0, %xmm0
1017 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1020 ; AVX2-LABEL: ugt_1_v16i16:
1022 ; AVX2-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
1023 ; AVX2-NEXT: vpaddw %ymm1, %ymm0, %ymm2
1024 ; AVX2-NEXT: vpand %ymm2, %ymm0, %ymm0
1025 ; AVX2-NEXT: vpxor %xmm2, %xmm2, %xmm2
1026 ; AVX2-NEXT: vpcmpeqw %ymm2, %ymm0, %ymm0
1027 ; AVX2-NEXT: vpxor %ymm1, %ymm0, %ymm0
1030 ; AVX512VPOPCNTDQ-LABEL: ugt_1_v16i16:
1031 ; AVX512VPOPCNTDQ: # %bb.0:
1032 ; AVX512VPOPCNTDQ-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
1033 ; AVX512VPOPCNTDQ-NEXT: vpaddw %ymm1, %ymm0, %ymm1
1034 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
1035 ; AVX512VPOPCNTDQ-NEXT: vpxor %xmm1, %xmm1, %xmm1
1036 ; AVX512VPOPCNTDQ-NEXT: vpcmpeqw %ymm1, %ymm0, %ymm0
1037 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
1038 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1039 ; AVX512VPOPCNTDQ-NEXT: retq
1041 ; AVX512VPOPCNTDQVL-LABEL: ugt_1_v16i16:
1042 ; AVX512VPOPCNTDQVL: # %bb.0:
1043 ; AVX512VPOPCNTDQVL-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
1044 ; AVX512VPOPCNTDQVL-NEXT: vpaddw %ymm1, %ymm0, %ymm1
1045 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
1046 ; AVX512VPOPCNTDQVL-NEXT: vpxor %xmm1, %xmm1, %xmm1
1047 ; AVX512VPOPCNTDQVL-NEXT: vpcmpeqw %ymm1, %ymm0, %ymm0
1048 ; AVX512VPOPCNTDQVL-NEXT: vpternlogq $15, %ymm0, %ymm0, %ymm0
1049 ; AVX512VPOPCNTDQVL-NEXT: retq
1051 ; BITALG_NOVLX-LABEL: ugt_1_v16i16:
1052 ; BITALG_NOVLX: # %bb.0:
1053 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1054 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1055 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1056 ; BITALG_NOVLX-NEXT: retq
1058 ; BITALG-LABEL: ugt_1_v16i16:
1060 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1061 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1063 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1064 %3 = icmp ugt <16 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>
1065 %4 = sext <16 x i1> %3 to <16 x i16>
1069 define <16 x i16> @ult_2_v16i16(<16 x i16> %0) {
1070 ; AVX1-LABEL: ult_2_v16i16:
1072 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
1073 ; AVX1-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
1074 ; AVX1-NEXT: vpaddw %xmm2, %xmm1, %xmm3
1075 ; AVX1-NEXT: vpand %xmm3, %xmm1, %xmm1
1076 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
1077 ; AVX1-NEXT: vpcmpeqw %xmm3, %xmm1, %xmm1
1078 ; AVX1-NEXT: vpaddw %xmm2, %xmm0, %xmm2
1079 ; AVX1-NEXT: vpand %xmm2, %xmm0, %xmm0
1080 ; AVX1-NEXT: vpcmpeqw %xmm3, %xmm0, %xmm0
1081 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1084 ; AVX2-LABEL: ult_2_v16i16:
1086 ; AVX2-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
1087 ; AVX2-NEXT: vpaddw %ymm1, %ymm0, %ymm1
1088 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1089 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
1090 ; AVX2-NEXT: vpcmpeqw %ymm1, %ymm0, %ymm0
1093 ; AVX512VPOPCNTDQ-LABEL: ult_2_v16i16:
1094 ; AVX512VPOPCNTDQ: # %bb.0:
1095 ; AVX512VPOPCNTDQ-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
1096 ; AVX512VPOPCNTDQ-NEXT: vpaddw %ymm1, %ymm0, %ymm1
1097 ; AVX512VPOPCNTDQ-NEXT: vpand %ymm1, %ymm0, %ymm0
1098 ; AVX512VPOPCNTDQ-NEXT: vpxor %xmm1, %xmm1, %xmm1
1099 ; AVX512VPOPCNTDQ-NEXT: vpcmpeqw %ymm1, %ymm0, %ymm0
1100 ; AVX512VPOPCNTDQ-NEXT: retq
1102 ; AVX512VPOPCNTDQVL-LABEL: ult_2_v16i16:
1103 ; AVX512VPOPCNTDQVL: # %bb.0:
1104 ; AVX512VPOPCNTDQVL-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
1105 ; AVX512VPOPCNTDQVL-NEXT: vpaddw %ymm1, %ymm0, %ymm1
1106 ; AVX512VPOPCNTDQVL-NEXT: vpand %ymm1, %ymm0, %ymm0
1107 ; AVX512VPOPCNTDQVL-NEXT: vpxor %xmm1, %xmm1, %xmm1
1108 ; AVX512VPOPCNTDQVL-NEXT: vpcmpeqw %ymm1, %ymm0, %ymm0
1109 ; AVX512VPOPCNTDQVL-NEXT: retq
1111 ; BITALG_NOVLX-LABEL: ult_2_v16i16:
1112 ; BITALG_NOVLX: # %bb.0:
1113 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1114 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1115 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
1116 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1117 ; BITALG_NOVLX-NEXT: retq
1119 ; BITALG-LABEL: ult_2_v16i16:
1121 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1122 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
1123 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1125 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1126 %3 = icmp ult <16 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>
1127 %4 = sext <16 x i1> %3 to <16 x i16>
1131 define <16 x i16> @ugt_2_v16i16(<16 x i16> %0) {
1132 ; AVX1-LABEL: ugt_2_v16i16:
1134 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1135 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1136 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1137 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1138 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1139 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1140 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1141 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1142 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1143 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1144 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1145 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1146 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1147 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1148 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1149 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1150 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1151 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1152 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1153 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1154 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1155 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [2,2,2,2,2,2,2,2]
1156 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
1157 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
1158 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1161 ; AVX2-LABEL: ugt_2_v16i16:
1163 ; AVX2-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]
1164 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
1165 ; AVX2-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]
1166 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
1167 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1168 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
1169 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1170 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1171 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
1172 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
1173 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1174 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
1175 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1178 ; AVX512VPOPCNTDQ-LABEL: ugt_2_v16i16:
1179 ; AVX512VPOPCNTDQ: # %bb.0:
1180 ; AVX512VPOPCNTDQ-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
1181 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
1182 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
1183 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1184 ; AVX512VPOPCNTDQ-NEXT: retq
1186 ; AVX512VPOPCNTDQVL-LABEL: ugt_2_v16i16:
1187 ; AVX512VPOPCNTDQVL: # %bb.0:
1188 ; AVX512VPOPCNTDQVL-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
1189 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
1190 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
1191 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1192 ; AVX512VPOPCNTDQVL-NEXT: retq
1194 ; BITALG_NOVLX-LABEL: ugt_2_v16i16:
1195 ; BITALG_NOVLX: # %bb.0:
1196 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1197 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1198 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1199 ; BITALG_NOVLX-NEXT: retq
1201 ; BITALG-LABEL: ugt_2_v16i16:
1203 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1204 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1206 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1207 %3 = icmp ugt <16 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>
1208 %4 = sext <16 x i1> %3 to <16 x i16>
1212 define <16 x i16> @ult_3_v16i16(<16 x i16> %0) {
1213 ; AVX1-LABEL: ult_3_v16i16:
1215 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1216 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1217 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1218 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1219 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1220 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1221 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1222 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1223 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1224 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1225 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1226 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1227 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1228 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1229 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1230 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1231 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1232 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1233 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1234 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1235 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1236 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [3,3,3,3,3,3,3,3]
1237 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
1238 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
1239 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1242 ; AVX2-LABEL: ult_3_v16i16:
1244 ; AVX2-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]
1245 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
1246 ; AVX2-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]
1247 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
1248 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1249 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
1250 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1251 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1252 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
1253 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
1254 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1255 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
1256 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1257 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1260 ; AVX512VPOPCNTDQ-LABEL: ult_3_v16i16:
1261 ; AVX512VPOPCNTDQ: # %bb.0:
1262 ; AVX512VPOPCNTDQ-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
1263 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
1264 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
1265 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1266 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1267 ; AVX512VPOPCNTDQ-NEXT: retq
1269 ; AVX512VPOPCNTDQVL-LABEL: ult_3_v16i16:
1270 ; AVX512VPOPCNTDQVL: # %bb.0:
1271 ; AVX512VPOPCNTDQVL-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
1272 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
1273 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
1274 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1275 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1276 ; AVX512VPOPCNTDQVL-NEXT: retq
1278 ; BITALG_NOVLX-LABEL: ult_3_v16i16:
1279 ; BITALG_NOVLX: # %bb.0:
1280 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1281 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1282 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1283 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1284 ; BITALG_NOVLX-NEXT: retq
1286 ; BITALG-LABEL: ult_3_v16i16:
1288 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1289 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1290 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1292 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1293 %3 = icmp ult <16 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>
1294 %4 = sext <16 x i1> %3 to <16 x i16>
1298 define <16 x i16> @ugt_3_v16i16(<16 x i16> %0) {
1299 ; AVX1-LABEL: ugt_3_v16i16:
1301 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1302 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1303 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1304 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1305 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1306 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1307 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1308 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1309 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1310 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1311 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1312 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1313 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1314 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1315 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1316 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1317 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1318 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1319 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1320 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1321 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1322 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [3,3,3,3,3,3,3,3]
1323 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
1324 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
1325 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1328 ; AVX2-LABEL: ugt_3_v16i16:
1330 ; AVX2-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]
1331 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
1332 ; AVX2-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]
1333 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
1334 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1335 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
1336 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1337 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1338 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
1339 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
1340 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1341 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
1342 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1345 ; AVX512VPOPCNTDQ-LABEL: ugt_3_v16i16:
1346 ; AVX512VPOPCNTDQ: # %bb.0:
1347 ; AVX512VPOPCNTDQ-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
1348 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
1349 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
1350 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1351 ; AVX512VPOPCNTDQ-NEXT: retq
1353 ; AVX512VPOPCNTDQVL-LABEL: ugt_3_v16i16:
1354 ; AVX512VPOPCNTDQVL: # %bb.0:
1355 ; AVX512VPOPCNTDQVL-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
1356 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
1357 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
1358 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1359 ; AVX512VPOPCNTDQVL-NEXT: retq
1361 ; BITALG_NOVLX-LABEL: ugt_3_v16i16:
1362 ; BITALG_NOVLX: # %bb.0:
1363 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1364 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1365 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1366 ; BITALG_NOVLX-NEXT: retq
1368 ; BITALG-LABEL: ugt_3_v16i16:
1370 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1371 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1373 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1374 %3 = icmp ugt <16 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>
1375 %4 = sext <16 x i1> %3 to <16 x i16>
1379 define <16 x i16> @ult_4_v16i16(<16 x i16> %0) {
1380 ; AVX1-LABEL: ult_4_v16i16:
1382 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1383 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1384 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1385 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1386 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1387 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1388 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1389 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1390 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1391 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1392 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1393 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1394 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1395 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1396 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1397 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1398 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1399 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1400 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1401 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1402 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1403 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [4,4,4,4,4,4,4,4]
1404 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
1405 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
1406 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1409 ; AVX2-LABEL: ult_4_v16i16:
1411 ; AVX2-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]
1412 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
1413 ; AVX2-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]
1414 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
1415 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1416 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
1417 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1418 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1419 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
1420 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
1421 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1422 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
1423 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1424 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1427 ; AVX512VPOPCNTDQ-LABEL: ult_4_v16i16:
1428 ; AVX512VPOPCNTDQ: # %bb.0:
1429 ; AVX512VPOPCNTDQ-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
1430 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
1431 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
1432 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1433 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1434 ; AVX512VPOPCNTDQ-NEXT: retq
1436 ; AVX512VPOPCNTDQVL-LABEL: ult_4_v16i16:
1437 ; AVX512VPOPCNTDQVL: # %bb.0:
1438 ; AVX512VPOPCNTDQVL-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
1439 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
1440 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
1441 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1442 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1443 ; AVX512VPOPCNTDQVL-NEXT: retq
1445 ; BITALG_NOVLX-LABEL: ult_4_v16i16:
1446 ; BITALG_NOVLX: # %bb.0:
1447 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1448 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1449 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1450 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1451 ; BITALG_NOVLX-NEXT: retq
1453 ; BITALG-LABEL: ult_4_v16i16:
1455 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1456 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1457 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1459 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1460 %3 = icmp ult <16 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>
1461 %4 = sext <16 x i1> %3 to <16 x i16>
1465 define <16 x i16> @ugt_4_v16i16(<16 x i16> %0) {
1466 ; AVX1-LABEL: ugt_4_v16i16:
1468 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1469 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1470 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1471 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1472 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1473 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1474 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1475 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1476 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1477 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1478 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1479 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1480 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1481 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1482 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1483 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1484 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1485 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1486 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1487 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1488 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1489 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [4,4,4,4,4,4,4,4]
1490 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
1491 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
1492 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1495 ; AVX2-LABEL: ugt_4_v16i16:
1497 ; AVX2-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]
1498 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
1499 ; AVX2-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]
1500 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
1501 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1502 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
1503 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1504 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1505 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
1506 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
1507 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1508 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
1509 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1512 ; AVX512VPOPCNTDQ-LABEL: ugt_4_v16i16:
1513 ; AVX512VPOPCNTDQ: # %bb.0:
1514 ; AVX512VPOPCNTDQ-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
1515 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
1516 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
1517 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1518 ; AVX512VPOPCNTDQ-NEXT: retq
1520 ; AVX512VPOPCNTDQVL-LABEL: ugt_4_v16i16:
1521 ; AVX512VPOPCNTDQVL: # %bb.0:
1522 ; AVX512VPOPCNTDQVL-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
1523 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
1524 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
1525 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1526 ; AVX512VPOPCNTDQVL-NEXT: retq
1528 ; BITALG_NOVLX-LABEL: ugt_4_v16i16:
1529 ; BITALG_NOVLX: # %bb.0:
1530 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1531 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1532 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1533 ; BITALG_NOVLX-NEXT: retq
1535 ; BITALG-LABEL: ugt_4_v16i16:
1537 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1538 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1540 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1541 %3 = icmp ugt <16 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>
1542 %4 = sext <16 x i1> %3 to <16 x i16>
1546 define <16 x i16> @ult_5_v16i16(<16 x i16> %0) {
1547 ; AVX1-LABEL: ult_5_v16i16:
1549 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1550 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1551 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1552 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1553 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1554 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1555 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1556 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1557 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1558 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1559 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1560 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1561 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1562 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1563 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1564 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1565 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1566 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1567 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1568 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1569 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1570 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [5,5,5,5,5,5,5,5]
1571 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
1572 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
1573 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1576 ; AVX2-LABEL: ult_5_v16i16:
1578 ; AVX2-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]
1579 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
1580 ; AVX2-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]
1581 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
1582 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1583 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
1584 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1585 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1586 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
1587 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
1588 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1589 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
1590 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1591 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1594 ; AVX512VPOPCNTDQ-LABEL: ult_5_v16i16:
1595 ; AVX512VPOPCNTDQ: # %bb.0:
1596 ; AVX512VPOPCNTDQ-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
1597 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
1598 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
1599 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1600 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1601 ; AVX512VPOPCNTDQ-NEXT: retq
1603 ; AVX512VPOPCNTDQVL-LABEL: ult_5_v16i16:
1604 ; AVX512VPOPCNTDQVL: # %bb.0:
1605 ; AVX512VPOPCNTDQVL-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
1606 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
1607 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
1608 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1609 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1610 ; AVX512VPOPCNTDQVL-NEXT: retq
1612 ; BITALG_NOVLX-LABEL: ult_5_v16i16:
1613 ; BITALG_NOVLX: # %bb.0:
1614 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1615 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1616 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1617 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1618 ; BITALG_NOVLX-NEXT: retq
1620 ; BITALG-LABEL: ult_5_v16i16:
1622 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1623 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1624 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1626 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1627 %3 = icmp ult <16 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>
1628 %4 = sext <16 x i1> %3 to <16 x i16>
1632 define <16 x i16> @ugt_5_v16i16(<16 x i16> %0) {
1633 ; AVX1-LABEL: ugt_5_v16i16:
1635 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1636 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1637 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1638 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1639 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1640 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1641 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1642 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1643 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1644 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1645 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1646 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1647 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1648 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1649 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1650 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1651 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1652 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1653 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1654 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1655 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1656 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [5,5,5,5,5,5,5,5]
1657 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
1658 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
1659 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1662 ; AVX2-LABEL: ugt_5_v16i16:
1664 ; AVX2-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]
1665 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
1666 ; AVX2-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]
1667 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
1668 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1669 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
1670 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1671 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1672 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
1673 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
1674 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1675 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
1676 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1679 ; AVX512VPOPCNTDQ-LABEL: ugt_5_v16i16:
1680 ; AVX512VPOPCNTDQ: # %bb.0:
1681 ; AVX512VPOPCNTDQ-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
1682 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
1683 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
1684 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1685 ; AVX512VPOPCNTDQ-NEXT: retq
1687 ; AVX512VPOPCNTDQVL-LABEL: ugt_5_v16i16:
1688 ; AVX512VPOPCNTDQVL: # %bb.0:
1689 ; AVX512VPOPCNTDQVL-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
1690 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
1691 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
1692 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1693 ; AVX512VPOPCNTDQVL-NEXT: retq
1695 ; BITALG_NOVLX-LABEL: ugt_5_v16i16:
1696 ; BITALG_NOVLX: # %bb.0:
1697 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1698 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1699 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1700 ; BITALG_NOVLX-NEXT: retq
1702 ; BITALG-LABEL: ugt_5_v16i16:
1704 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1705 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1707 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1708 %3 = icmp ugt <16 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>
1709 %4 = sext <16 x i1> %3 to <16 x i16>
1713 define <16 x i16> @ult_6_v16i16(<16 x i16> %0) {
1714 ; AVX1-LABEL: ult_6_v16i16:
1716 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1717 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1718 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1719 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1720 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1721 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1722 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1723 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1724 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1725 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1726 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1727 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1728 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1729 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1730 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1731 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1732 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1733 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1734 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1735 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1736 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1737 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [6,6,6,6,6,6,6,6]
1738 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
1739 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
1740 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1743 ; AVX2-LABEL: ult_6_v16i16:
1745 ; AVX2-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]
1746 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
1747 ; AVX2-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]
1748 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
1749 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1750 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
1751 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1752 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1753 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
1754 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
1755 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1756 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
1757 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1758 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1761 ; AVX512VPOPCNTDQ-LABEL: ult_6_v16i16:
1762 ; AVX512VPOPCNTDQ: # %bb.0:
1763 ; AVX512VPOPCNTDQ-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
1764 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
1765 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
1766 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1767 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1768 ; AVX512VPOPCNTDQ-NEXT: retq
1770 ; AVX512VPOPCNTDQVL-LABEL: ult_6_v16i16:
1771 ; AVX512VPOPCNTDQVL: # %bb.0:
1772 ; AVX512VPOPCNTDQVL-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
1773 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
1774 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
1775 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1776 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1777 ; AVX512VPOPCNTDQVL-NEXT: retq
1779 ; BITALG_NOVLX-LABEL: ult_6_v16i16:
1780 ; BITALG_NOVLX: # %bb.0:
1781 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1782 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1783 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1784 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1785 ; BITALG_NOVLX-NEXT: retq
1787 ; BITALG-LABEL: ult_6_v16i16:
1789 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1790 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1791 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1793 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1794 %3 = icmp ult <16 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>
1795 %4 = sext <16 x i1> %3 to <16 x i16>
1799 define <16 x i16> @ugt_6_v16i16(<16 x i16> %0) {
1800 ; AVX1-LABEL: ugt_6_v16i16:
1802 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1803 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1804 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1805 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1806 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1807 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1808 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1809 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1810 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1811 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1812 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1813 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1814 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1815 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1816 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1817 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1818 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1819 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1820 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1821 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1822 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1823 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [6,6,6,6,6,6,6,6]
1824 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
1825 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
1826 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1829 ; AVX2-LABEL: ugt_6_v16i16:
1831 ; AVX2-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]
1832 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
1833 ; AVX2-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]
1834 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
1835 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1836 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
1837 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1838 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1839 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
1840 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
1841 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1842 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
1843 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1846 ; AVX512VPOPCNTDQ-LABEL: ugt_6_v16i16:
1847 ; AVX512VPOPCNTDQ: # %bb.0:
1848 ; AVX512VPOPCNTDQ-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
1849 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
1850 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
1851 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1852 ; AVX512VPOPCNTDQ-NEXT: retq
1854 ; AVX512VPOPCNTDQVL-LABEL: ugt_6_v16i16:
1855 ; AVX512VPOPCNTDQVL: # %bb.0:
1856 ; AVX512VPOPCNTDQVL-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
1857 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
1858 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
1859 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1860 ; AVX512VPOPCNTDQVL-NEXT: retq
1862 ; BITALG_NOVLX-LABEL: ugt_6_v16i16:
1863 ; BITALG_NOVLX: # %bb.0:
1864 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1865 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1866 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1867 ; BITALG_NOVLX-NEXT: retq
1869 ; BITALG-LABEL: ugt_6_v16i16:
1871 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1872 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1874 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1875 %3 = icmp ugt <16 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>
1876 %4 = sext <16 x i1> %3 to <16 x i16>
1880 define <16 x i16> @ult_7_v16i16(<16 x i16> %0) {
1881 ; AVX1-LABEL: ult_7_v16i16:
1883 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1884 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1885 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1886 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1887 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1888 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1889 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1890 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1891 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1892 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1893 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1894 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1895 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1896 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1897 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1898 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1899 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1900 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1901 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1902 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1903 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1904 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [7,7,7,7,7,7,7,7]
1905 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
1906 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
1907 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1910 ; AVX2-LABEL: ult_7_v16i16:
1912 ; AVX2-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]
1913 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
1914 ; AVX2-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]
1915 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
1916 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1917 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
1918 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
1919 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1920 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
1921 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
1922 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1923 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
1924 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
1925 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1928 ; AVX512VPOPCNTDQ-LABEL: ult_7_v16i16:
1929 ; AVX512VPOPCNTDQ: # %bb.0:
1930 ; AVX512VPOPCNTDQ-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
1931 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
1932 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
1933 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
1934 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1935 ; AVX512VPOPCNTDQ-NEXT: retq
1937 ; AVX512VPOPCNTDQVL-LABEL: ult_7_v16i16:
1938 ; AVX512VPOPCNTDQVL: # %bb.0:
1939 ; AVX512VPOPCNTDQVL-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
1940 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
1941 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
1942 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
1943 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1944 ; AVX512VPOPCNTDQVL-NEXT: retq
1946 ; BITALG_NOVLX-LABEL: ult_7_v16i16:
1947 ; BITALG_NOVLX: # %bb.0:
1948 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1949 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
1950 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
1951 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1952 ; BITALG_NOVLX-NEXT: retq
1954 ; BITALG-LABEL: ult_7_v16i16:
1956 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
1957 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
1958 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1960 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
1961 %3 = icmp ult <16 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>
1962 %4 = sext <16 x i1> %3 to <16 x i16>
1966 define <16 x i16> @ugt_7_v16i16(<16 x i16> %0) {
1967 ; AVX1-LABEL: ugt_7_v16i16:
1969 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1970 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
1971 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1972 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
1973 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
1974 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
1975 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1976 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1977 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
1978 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
1979 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
1980 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1981 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
1982 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
1983 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
1984 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
1985 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
1986 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
1987 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
1988 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
1989 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
1990 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [7,7,7,7,7,7,7,7]
1991 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
1992 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
1993 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
1996 ; AVX2-LABEL: ugt_7_v16i16:
1998 ; AVX2-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]
1999 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2000 ; AVX2-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]
2001 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2002 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2003 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2004 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2005 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2006 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2007 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2008 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2009 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2010 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2013 ; AVX512VPOPCNTDQ-LABEL: ugt_7_v16i16:
2014 ; AVX512VPOPCNTDQ: # %bb.0:
2015 ; AVX512VPOPCNTDQ-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
2016 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2017 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2018 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2019 ; AVX512VPOPCNTDQ-NEXT: retq
2021 ; AVX512VPOPCNTDQVL-LABEL: ugt_7_v16i16:
2022 ; AVX512VPOPCNTDQVL: # %bb.0:
2023 ; AVX512VPOPCNTDQVL-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
2024 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2025 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2026 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2027 ; AVX512VPOPCNTDQVL-NEXT: retq
2029 ; BITALG_NOVLX-LABEL: ugt_7_v16i16:
2030 ; BITALG_NOVLX: # %bb.0:
2031 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2032 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2033 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2034 ; BITALG_NOVLX-NEXT: retq
2036 ; BITALG-LABEL: ugt_7_v16i16:
2038 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2039 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2041 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2042 %3 = icmp ugt <16 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>
2043 %4 = sext <16 x i1> %3 to <16 x i16>
2047 define <16 x i16> @ult_8_v16i16(<16 x i16> %0) {
2048 ; AVX1-LABEL: ult_8_v16i16:
2050 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2051 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2052 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2053 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2054 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2055 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2056 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2057 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2058 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2059 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2060 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2061 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2062 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2063 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2064 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2065 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2066 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2067 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2068 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2069 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2070 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2071 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [8,8,8,8,8,8,8,8]
2072 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
2073 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
2074 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2077 ; AVX2-LABEL: ult_8_v16i16:
2079 ; AVX2-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]
2080 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2081 ; AVX2-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]
2082 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2083 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2084 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2085 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2086 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2087 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2088 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2089 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2090 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2091 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2092 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2095 ; AVX512VPOPCNTDQ-LABEL: ult_8_v16i16:
2096 ; AVX512VPOPCNTDQ: # %bb.0:
2097 ; AVX512VPOPCNTDQ-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
2098 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2099 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2100 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2101 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2102 ; AVX512VPOPCNTDQ-NEXT: retq
2104 ; AVX512VPOPCNTDQVL-LABEL: ult_8_v16i16:
2105 ; AVX512VPOPCNTDQVL: # %bb.0:
2106 ; AVX512VPOPCNTDQVL-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
2107 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2108 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2109 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2110 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2111 ; AVX512VPOPCNTDQVL-NEXT: retq
2113 ; BITALG_NOVLX-LABEL: ult_8_v16i16:
2114 ; BITALG_NOVLX: # %bb.0:
2115 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2116 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2117 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2118 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2119 ; BITALG_NOVLX-NEXT: retq
2121 ; BITALG-LABEL: ult_8_v16i16:
2123 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2124 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2125 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2127 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2128 %3 = icmp ult <16 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>
2129 %4 = sext <16 x i1> %3 to <16 x i16>
2133 define <16 x i16> @ugt_8_v16i16(<16 x i16> %0) {
2134 ; AVX1-LABEL: ugt_8_v16i16:
2136 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2137 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2138 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2139 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2140 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2141 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2142 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2143 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2144 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2145 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2146 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2147 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2148 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2149 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2150 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2151 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2152 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2153 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2154 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2155 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2156 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2157 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [8,8,8,8,8,8,8,8]
2158 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
2159 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
2160 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2163 ; AVX2-LABEL: ugt_8_v16i16:
2165 ; AVX2-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]
2166 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2167 ; AVX2-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]
2168 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2169 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2170 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2171 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2172 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2173 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2174 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2175 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2176 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2177 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2180 ; AVX512VPOPCNTDQ-LABEL: ugt_8_v16i16:
2181 ; AVX512VPOPCNTDQ: # %bb.0:
2182 ; AVX512VPOPCNTDQ-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
2183 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2184 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2185 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2186 ; AVX512VPOPCNTDQ-NEXT: retq
2188 ; AVX512VPOPCNTDQVL-LABEL: ugt_8_v16i16:
2189 ; AVX512VPOPCNTDQVL: # %bb.0:
2190 ; AVX512VPOPCNTDQVL-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
2191 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2192 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2193 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2194 ; AVX512VPOPCNTDQVL-NEXT: retq
2196 ; BITALG_NOVLX-LABEL: ugt_8_v16i16:
2197 ; BITALG_NOVLX: # %bb.0:
2198 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2199 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2200 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2201 ; BITALG_NOVLX-NEXT: retq
2203 ; BITALG-LABEL: ugt_8_v16i16:
2205 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2206 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2208 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2209 %3 = icmp ugt <16 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>
2210 %4 = sext <16 x i1> %3 to <16 x i16>
2214 define <16 x i16> @ult_9_v16i16(<16 x i16> %0) {
2215 ; AVX1-LABEL: ult_9_v16i16:
2217 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2218 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2219 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2220 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2221 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2222 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2223 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2224 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2225 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2226 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2227 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2228 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2229 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2230 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2231 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2232 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2233 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2234 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2235 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2236 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2237 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2238 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [9,9,9,9,9,9,9,9]
2239 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
2240 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
2241 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2244 ; AVX2-LABEL: ult_9_v16i16:
2246 ; AVX2-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]
2247 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2248 ; AVX2-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]
2249 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2250 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2251 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2252 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2253 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2254 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2255 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2256 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2257 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2258 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2259 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2262 ; AVX512VPOPCNTDQ-LABEL: ult_9_v16i16:
2263 ; AVX512VPOPCNTDQ: # %bb.0:
2264 ; AVX512VPOPCNTDQ-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
2265 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2266 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2267 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2268 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2269 ; AVX512VPOPCNTDQ-NEXT: retq
2271 ; AVX512VPOPCNTDQVL-LABEL: ult_9_v16i16:
2272 ; AVX512VPOPCNTDQVL: # %bb.0:
2273 ; AVX512VPOPCNTDQVL-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
2274 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2275 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2276 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2277 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2278 ; AVX512VPOPCNTDQVL-NEXT: retq
2280 ; BITALG_NOVLX-LABEL: ult_9_v16i16:
2281 ; BITALG_NOVLX: # %bb.0:
2282 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2283 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2284 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2285 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2286 ; BITALG_NOVLX-NEXT: retq
2288 ; BITALG-LABEL: ult_9_v16i16:
2290 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2291 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2292 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2294 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2295 %3 = icmp ult <16 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>
2296 %4 = sext <16 x i1> %3 to <16 x i16>
2300 define <16 x i16> @ugt_9_v16i16(<16 x i16> %0) {
2301 ; AVX1-LABEL: ugt_9_v16i16:
2303 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2304 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2305 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2306 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2307 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2308 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2309 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2310 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2311 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2312 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2313 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2314 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2315 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2316 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2317 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2318 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2319 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2320 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2321 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2322 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2323 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2324 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [9,9,9,9,9,9,9,9]
2325 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
2326 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
2327 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2330 ; AVX2-LABEL: ugt_9_v16i16:
2332 ; AVX2-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]
2333 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2334 ; AVX2-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]
2335 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2336 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2337 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2338 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2339 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2340 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2341 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2342 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2343 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2344 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2347 ; AVX512VPOPCNTDQ-LABEL: ugt_9_v16i16:
2348 ; AVX512VPOPCNTDQ: # %bb.0:
2349 ; AVX512VPOPCNTDQ-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
2350 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2351 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2352 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2353 ; AVX512VPOPCNTDQ-NEXT: retq
2355 ; AVX512VPOPCNTDQVL-LABEL: ugt_9_v16i16:
2356 ; AVX512VPOPCNTDQVL: # %bb.0:
2357 ; AVX512VPOPCNTDQVL-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
2358 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2359 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2360 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2361 ; AVX512VPOPCNTDQVL-NEXT: retq
2363 ; BITALG_NOVLX-LABEL: ugt_9_v16i16:
2364 ; BITALG_NOVLX: # %bb.0:
2365 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2366 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2367 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2368 ; BITALG_NOVLX-NEXT: retq
2370 ; BITALG-LABEL: ugt_9_v16i16:
2372 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2373 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2375 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2376 %3 = icmp ugt <16 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>
2377 %4 = sext <16 x i1> %3 to <16 x i16>
2381 define <16 x i16> @ult_10_v16i16(<16 x i16> %0) {
2382 ; AVX1-LABEL: ult_10_v16i16:
2384 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2385 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2386 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2387 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2388 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2389 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2390 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2391 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2392 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2393 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2394 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2395 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2396 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2397 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2398 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2399 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2400 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2401 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2402 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2403 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2404 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2405 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [10,10,10,10,10,10,10,10]
2406 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
2407 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
2408 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2411 ; AVX2-LABEL: ult_10_v16i16:
2413 ; AVX2-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]
2414 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2415 ; AVX2-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]
2416 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2417 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2418 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2419 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2420 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2421 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2422 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2423 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2424 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2425 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2426 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2429 ; AVX512VPOPCNTDQ-LABEL: ult_10_v16i16:
2430 ; AVX512VPOPCNTDQ: # %bb.0:
2431 ; AVX512VPOPCNTDQ-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
2432 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2433 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2434 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2435 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2436 ; AVX512VPOPCNTDQ-NEXT: retq
2438 ; AVX512VPOPCNTDQVL-LABEL: ult_10_v16i16:
2439 ; AVX512VPOPCNTDQVL: # %bb.0:
2440 ; AVX512VPOPCNTDQVL-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
2441 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2442 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2443 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2444 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2445 ; AVX512VPOPCNTDQVL-NEXT: retq
2447 ; BITALG_NOVLX-LABEL: ult_10_v16i16:
2448 ; BITALG_NOVLX: # %bb.0:
2449 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2450 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2451 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2452 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2453 ; BITALG_NOVLX-NEXT: retq
2455 ; BITALG-LABEL: ult_10_v16i16:
2457 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2458 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2459 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2461 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2462 %3 = icmp ult <16 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>
2463 %4 = sext <16 x i1> %3 to <16 x i16>
2467 define <16 x i16> @ugt_10_v16i16(<16 x i16> %0) {
2468 ; AVX1-LABEL: ugt_10_v16i16:
2470 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2471 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2472 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2473 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2474 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2475 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2476 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2477 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2478 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2479 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2480 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2481 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2482 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2483 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2484 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2485 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2486 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2487 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2488 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2489 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2490 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2491 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [10,10,10,10,10,10,10,10]
2492 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
2493 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
2494 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2497 ; AVX2-LABEL: ugt_10_v16i16:
2499 ; AVX2-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]
2500 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2501 ; AVX2-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]
2502 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2503 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2504 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2505 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2506 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2507 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2508 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2509 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2510 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2511 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2514 ; AVX512VPOPCNTDQ-LABEL: ugt_10_v16i16:
2515 ; AVX512VPOPCNTDQ: # %bb.0:
2516 ; AVX512VPOPCNTDQ-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
2517 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2518 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2519 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2520 ; AVX512VPOPCNTDQ-NEXT: retq
2522 ; AVX512VPOPCNTDQVL-LABEL: ugt_10_v16i16:
2523 ; AVX512VPOPCNTDQVL: # %bb.0:
2524 ; AVX512VPOPCNTDQVL-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
2525 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2526 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2527 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2528 ; AVX512VPOPCNTDQVL-NEXT: retq
2530 ; BITALG_NOVLX-LABEL: ugt_10_v16i16:
2531 ; BITALG_NOVLX: # %bb.0:
2532 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2533 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2534 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2535 ; BITALG_NOVLX-NEXT: retq
2537 ; BITALG-LABEL: ugt_10_v16i16:
2539 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2540 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2542 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2543 %3 = icmp ugt <16 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>
2544 %4 = sext <16 x i1> %3 to <16 x i16>
2548 define <16 x i16> @ult_11_v16i16(<16 x i16> %0) {
2549 ; AVX1-LABEL: ult_11_v16i16:
2551 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2552 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2553 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2554 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2555 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2556 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2557 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2558 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2559 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2560 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2561 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2562 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2563 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2564 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2565 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2566 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2567 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2568 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2569 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2570 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2571 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2572 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [11,11,11,11,11,11,11,11]
2573 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
2574 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
2575 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2578 ; AVX2-LABEL: ult_11_v16i16:
2580 ; AVX2-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]
2581 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2582 ; AVX2-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]
2583 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2584 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2585 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2586 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2587 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2588 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2589 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2590 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2591 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2592 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2593 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2596 ; AVX512VPOPCNTDQ-LABEL: ult_11_v16i16:
2597 ; AVX512VPOPCNTDQ: # %bb.0:
2598 ; AVX512VPOPCNTDQ-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
2599 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2600 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2601 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2602 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2603 ; AVX512VPOPCNTDQ-NEXT: retq
2605 ; AVX512VPOPCNTDQVL-LABEL: ult_11_v16i16:
2606 ; AVX512VPOPCNTDQVL: # %bb.0:
2607 ; AVX512VPOPCNTDQVL-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
2608 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2609 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2610 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2611 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2612 ; AVX512VPOPCNTDQVL-NEXT: retq
2614 ; BITALG_NOVLX-LABEL: ult_11_v16i16:
2615 ; BITALG_NOVLX: # %bb.0:
2616 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2617 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2618 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2619 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2620 ; BITALG_NOVLX-NEXT: retq
2622 ; BITALG-LABEL: ult_11_v16i16:
2624 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2625 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2626 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2628 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2629 %3 = icmp ult <16 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>
2630 %4 = sext <16 x i1> %3 to <16 x i16>
2634 define <16 x i16> @ugt_11_v16i16(<16 x i16> %0) {
2635 ; AVX1-LABEL: ugt_11_v16i16:
2637 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2638 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2639 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2640 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2641 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2642 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2643 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2644 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2645 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2646 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2647 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2648 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2649 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2650 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2651 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2652 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2653 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2654 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2655 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2656 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2657 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2658 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [11,11,11,11,11,11,11,11]
2659 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
2660 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
2661 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2664 ; AVX2-LABEL: ugt_11_v16i16:
2666 ; AVX2-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]
2667 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2668 ; AVX2-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]
2669 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2670 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2671 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2672 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2673 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2674 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2675 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2676 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2677 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2678 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2681 ; AVX512VPOPCNTDQ-LABEL: ugt_11_v16i16:
2682 ; AVX512VPOPCNTDQ: # %bb.0:
2683 ; AVX512VPOPCNTDQ-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
2684 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2685 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2686 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2687 ; AVX512VPOPCNTDQ-NEXT: retq
2689 ; AVX512VPOPCNTDQVL-LABEL: ugt_11_v16i16:
2690 ; AVX512VPOPCNTDQVL: # %bb.0:
2691 ; AVX512VPOPCNTDQVL-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
2692 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2693 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2694 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2695 ; AVX512VPOPCNTDQVL-NEXT: retq
2697 ; BITALG_NOVLX-LABEL: ugt_11_v16i16:
2698 ; BITALG_NOVLX: # %bb.0:
2699 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2700 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2701 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2702 ; BITALG_NOVLX-NEXT: retq
2704 ; BITALG-LABEL: ugt_11_v16i16:
2706 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2707 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2709 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2710 %3 = icmp ugt <16 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>
2711 %4 = sext <16 x i1> %3 to <16 x i16>
2715 define <16 x i16> @ult_12_v16i16(<16 x i16> %0) {
2716 ; AVX1-LABEL: ult_12_v16i16:
2718 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2719 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2720 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2721 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2722 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2723 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2724 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2725 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2726 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2727 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2728 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2729 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2730 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2731 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2732 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2733 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2734 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2735 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2736 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2737 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2738 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2739 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [12,12,12,12,12,12,12,12]
2740 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
2741 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
2742 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2745 ; AVX2-LABEL: ult_12_v16i16:
2747 ; AVX2-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]
2748 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2749 ; AVX2-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]
2750 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2751 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2752 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2753 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2754 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2755 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2756 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2757 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2758 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2759 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
2760 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2763 ; AVX512VPOPCNTDQ-LABEL: ult_12_v16i16:
2764 ; AVX512VPOPCNTDQ: # %bb.0:
2765 ; AVX512VPOPCNTDQ-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
2766 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2767 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2768 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
2769 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2770 ; AVX512VPOPCNTDQ-NEXT: retq
2772 ; AVX512VPOPCNTDQVL-LABEL: ult_12_v16i16:
2773 ; AVX512VPOPCNTDQVL: # %bb.0:
2774 ; AVX512VPOPCNTDQVL-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
2775 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2776 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2777 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
2778 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2779 ; AVX512VPOPCNTDQVL-NEXT: retq
2781 ; BITALG_NOVLX-LABEL: ult_12_v16i16:
2782 ; BITALG_NOVLX: # %bb.0:
2783 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2784 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2785 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
2786 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2787 ; BITALG_NOVLX-NEXT: retq
2789 ; BITALG-LABEL: ult_12_v16i16:
2791 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2792 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
2793 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2795 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2796 %3 = icmp ult <16 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>
2797 %4 = sext <16 x i1> %3 to <16 x i16>
2801 define <16 x i16> @ugt_12_v16i16(<16 x i16> %0) {
2802 ; AVX1-LABEL: ugt_12_v16i16:
2804 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2805 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2806 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2807 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2808 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2809 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2810 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2811 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2812 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2813 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2814 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2815 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2816 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2817 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2818 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2819 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2820 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2821 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2822 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2823 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2824 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2825 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [12,12,12,12,12,12,12,12]
2826 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
2827 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
2828 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2831 ; AVX2-LABEL: ugt_12_v16i16:
2833 ; AVX2-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]
2834 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2835 ; AVX2-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]
2836 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2837 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2838 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2839 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2840 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2841 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2842 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2843 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2844 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2845 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2848 ; AVX512VPOPCNTDQ-LABEL: ugt_12_v16i16:
2849 ; AVX512VPOPCNTDQ: # %bb.0:
2850 ; AVX512VPOPCNTDQ-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
2851 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2852 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2853 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2854 ; AVX512VPOPCNTDQ-NEXT: retq
2856 ; AVX512VPOPCNTDQVL-LABEL: ugt_12_v16i16:
2857 ; AVX512VPOPCNTDQVL: # %bb.0:
2858 ; AVX512VPOPCNTDQVL-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
2859 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2860 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2861 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2862 ; AVX512VPOPCNTDQVL-NEXT: retq
2864 ; BITALG_NOVLX-LABEL: ugt_12_v16i16:
2865 ; BITALG_NOVLX: # %bb.0:
2866 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2867 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2868 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2869 ; BITALG_NOVLX-NEXT: retq
2871 ; BITALG-LABEL: ugt_12_v16i16:
2873 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2874 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
2876 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2877 %3 = icmp ugt <16 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>
2878 %4 = sext <16 x i1> %3 to <16 x i16>
2882 define <16 x i16> @ult_13_v16i16(<16 x i16> %0) {
2883 ; AVX1-LABEL: ult_13_v16i16:
2885 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2886 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2887 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2888 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2889 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2890 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2891 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2892 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2893 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2894 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2895 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2896 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2897 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2898 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2899 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2900 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2901 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2902 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2903 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2904 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2905 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2906 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [13,13,13,13,13,13,13,13]
2907 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
2908 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
2909 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2912 ; AVX2-LABEL: ult_13_v16i16:
2914 ; AVX2-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]
2915 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
2916 ; AVX2-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]
2917 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
2918 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2919 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
2920 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
2921 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2922 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
2923 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
2924 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2925 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
2926 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
2927 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2930 ; AVX512VPOPCNTDQ-LABEL: ult_13_v16i16:
2931 ; AVX512VPOPCNTDQ: # %bb.0:
2932 ; AVX512VPOPCNTDQ-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
2933 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
2934 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
2935 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
2936 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2937 ; AVX512VPOPCNTDQ-NEXT: retq
2939 ; AVX512VPOPCNTDQVL-LABEL: ult_13_v16i16:
2940 ; AVX512VPOPCNTDQVL: # %bb.0:
2941 ; AVX512VPOPCNTDQVL-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
2942 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
2943 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
2944 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
2945 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2946 ; AVX512VPOPCNTDQVL-NEXT: retq
2948 ; BITALG_NOVLX-LABEL: ult_13_v16i16:
2949 ; BITALG_NOVLX: # %bb.0:
2950 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
2951 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
2952 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
2953 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2954 ; BITALG_NOVLX-NEXT: retq
2956 ; BITALG-LABEL: ult_13_v16i16:
2958 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
2959 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
2960 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2962 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
2963 %3 = icmp ult <16 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>
2964 %4 = sext <16 x i1> %3 to <16 x i16>
2968 define <16 x i16> @ugt_13_v16i16(<16 x i16> %0) {
2969 ; AVX1-LABEL: ugt_13_v16i16:
2971 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2972 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
2973 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2974 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
2975 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
2976 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
2977 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2978 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2979 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
2980 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
2981 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
2982 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
2983 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
2984 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
2985 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
2986 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
2987 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
2988 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
2989 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
2990 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
2991 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
2992 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [13,13,13,13,13,13,13,13]
2993 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
2994 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
2995 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
2998 ; AVX2-LABEL: ugt_13_v16i16:
3000 ; AVX2-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]
3001 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
3002 ; AVX2-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]
3003 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
3004 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3005 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
3006 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3007 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3008 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
3009 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
3010 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3011 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
3012 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3015 ; AVX512VPOPCNTDQ-LABEL: ugt_13_v16i16:
3016 ; AVX512VPOPCNTDQ: # %bb.0:
3017 ; AVX512VPOPCNTDQ-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
3018 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3019 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
3020 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3021 ; AVX512VPOPCNTDQ-NEXT: retq
3023 ; AVX512VPOPCNTDQVL-LABEL: ugt_13_v16i16:
3024 ; AVX512VPOPCNTDQVL: # %bb.0:
3025 ; AVX512VPOPCNTDQVL-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
3026 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
3027 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
3028 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3029 ; AVX512VPOPCNTDQVL-NEXT: retq
3031 ; BITALG_NOVLX-LABEL: ugt_13_v16i16:
3032 ; BITALG_NOVLX: # %bb.0:
3033 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3034 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
3035 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3036 ; BITALG_NOVLX-NEXT: retq
3038 ; BITALG-LABEL: ugt_13_v16i16:
3040 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
3041 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3043 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
3044 %3 = icmp ugt <16 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>
3045 %4 = sext <16 x i1> %3 to <16 x i16>
3049 define <16 x i16> @ult_14_v16i16(<16 x i16> %0) {
3050 ; AVX1-LABEL: ult_14_v16i16:
3052 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3053 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
3054 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3055 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
3056 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
3057 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
3058 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3059 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3060 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
3061 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3062 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
3063 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
3064 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
3065 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3066 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
3067 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
3068 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
3069 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
3070 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
3071 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
3072 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
3073 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [14,14,14,14,14,14,14,14]
3074 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
3075 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
3076 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3079 ; AVX2-LABEL: ult_14_v16i16:
3081 ; AVX2-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]
3082 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
3083 ; AVX2-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]
3084 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
3085 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3086 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
3087 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3088 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3089 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
3090 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
3091 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3092 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
3093 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3094 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3097 ; AVX512VPOPCNTDQ-LABEL: ult_14_v16i16:
3098 ; AVX512VPOPCNTDQ: # %bb.0:
3099 ; AVX512VPOPCNTDQ-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
3100 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3101 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
3102 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3103 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3104 ; AVX512VPOPCNTDQ-NEXT: retq
3106 ; AVX512VPOPCNTDQVL-LABEL: ult_14_v16i16:
3107 ; AVX512VPOPCNTDQVL: # %bb.0:
3108 ; AVX512VPOPCNTDQVL-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
3109 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
3110 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
3111 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3112 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3113 ; AVX512VPOPCNTDQVL-NEXT: retq
3115 ; BITALG_NOVLX-LABEL: ult_14_v16i16:
3116 ; BITALG_NOVLX: # %bb.0:
3117 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3118 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
3119 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3120 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3121 ; BITALG_NOVLX-NEXT: retq
3123 ; BITALG-LABEL: ult_14_v16i16:
3125 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
3126 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3127 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3129 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
3130 %3 = icmp ult <16 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>
3131 %4 = sext <16 x i1> %3 to <16 x i16>
3135 define <16 x i16> @ugt_14_v16i16(<16 x i16> %0) {
3136 ; AVX1-LABEL: ugt_14_v16i16:
3138 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3139 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
3140 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3141 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
3142 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
3143 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
3144 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3145 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3146 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
3147 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3148 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
3149 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
3150 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
3151 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3152 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
3153 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
3154 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
3155 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
3156 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
3157 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
3158 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
3159 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [14,14,14,14,14,14,14,14]
3160 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm0, %xmm0
3161 ; AVX1-NEXT: vpcmpgtw %xmm1, %xmm2, %xmm1
3162 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3165 ; AVX2-LABEL: ugt_14_v16i16:
3167 ; AVX2-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]
3168 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
3169 ; AVX2-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]
3170 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
3171 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3172 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
3173 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3174 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3175 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
3176 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
3177 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3178 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
3179 ; AVX2-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3182 ; AVX512VPOPCNTDQ-LABEL: ugt_14_v16i16:
3183 ; AVX512VPOPCNTDQ: # %bb.0:
3184 ; AVX512VPOPCNTDQ-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
3185 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3186 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
3187 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3188 ; AVX512VPOPCNTDQ-NEXT: retq
3190 ; AVX512VPOPCNTDQVL-LABEL: ugt_14_v16i16:
3191 ; AVX512VPOPCNTDQVL: # %bb.0:
3192 ; AVX512VPOPCNTDQVL-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
3193 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
3194 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
3195 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3196 ; AVX512VPOPCNTDQVL-NEXT: retq
3198 ; BITALG_NOVLX-LABEL: ugt_14_v16i16:
3199 ; BITALG_NOVLX: # %bb.0:
3200 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3201 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
3202 ; BITALG_NOVLX-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3203 ; BITALG_NOVLX-NEXT: retq
3205 ; BITALG-LABEL: ugt_14_v16i16:
3207 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
3208 ; BITALG-NEXT: vpcmpgtw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
3210 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
3211 %3 = icmp ugt <16 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>
3212 %4 = sext <16 x i1> %3 to <16 x i16>
3216 define <16 x i16> @ult_15_v16i16(<16 x i16> %0) {
3217 ; AVX1-LABEL: ult_15_v16i16:
3219 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3220 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
3221 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3222 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
3223 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
3224 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
3225 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3226 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3227 ; AVX1-NEXT: vpsllw $8, %xmm2, %xmm4
3228 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3229 ; AVX1-NEXT: vpsrlw $8, %xmm2, %xmm2
3230 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
3231 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm4
3232 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3233 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
3234 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
3235 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
3236 ; AVX1-NEXT: vpaddb %xmm4, %xmm0, %xmm0
3237 ; AVX1-NEXT: vpsllw $8, %xmm0, %xmm1
3238 ; AVX1-NEXT: vpaddb %xmm0, %xmm1, %xmm0
3239 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm0
3240 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15]
3241 ; AVX1-NEXT: vpcmpgtw %xmm0, %xmm1, %xmm0
3242 ; AVX1-NEXT: vpcmpgtw %xmm2, %xmm1, %xmm1
3243 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3246 ; AVX2-LABEL: ult_15_v16i16:
3248 ; AVX2-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]
3249 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
3250 ; AVX2-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]
3251 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
3252 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3253 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
3254 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3255 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3256 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
3257 ; AVX2-NEXT: vpsllw $8, %ymm0, %ymm1
3258 ; AVX2-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3259 ; AVX2-NEXT: vpsrlw $8, %ymm0, %ymm0
3260 ; AVX2-NEXT: vpbroadcastw {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3261 ; AVX2-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3264 ; AVX512VPOPCNTDQ-LABEL: ult_15_v16i16:
3265 ; AVX512VPOPCNTDQ: # %bb.0:
3266 ; AVX512VPOPCNTDQ-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
3267 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3268 ; AVX512VPOPCNTDQ-NEXT: vpmovdw %zmm0, %ymm0
3269 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastw {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3270 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3271 ; AVX512VPOPCNTDQ-NEXT: retq
3273 ; AVX512VPOPCNTDQVL-LABEL: ult_15_v16i16:
3274 ; AVX512VPOPCNTDQVL: # %bb.0:
3275 ; AVX512VPOPCNTDQVL-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
3276 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %zmm0, %zmm0
3277 ; AVX512VPOPCNTDQVL-NEXT: vpmovdw %zmm0, %ymm0
3278 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3279 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3280 ; AVX512VPOPCNTDQVL-NEXT: retq
3282 ; BITALG_NOVLX-LABEL: ult_15_v16i16:
3283 ; BITALG_NOVLX: # %bb.0:
3284 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3285 ; BITALG_NOVLX-NEXT: vpopcntw %zmm0, %zmm0
3286 ; BITALG_NOVLX-NEXT: vpbroadcastw {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3287 ; BITALG_NOVLX-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3288 ; BITALG_NOVLX-NEXT: retq
3290 ; BITALG-LABEL: ult_15_v16i16:
3292 ; BITALG-NEXT: vpopcntw %ymm0, %ymm0
3293 ; BITALG-NEXT: vpbroadcastw {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3294 ; BITALG-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3296 %2 = tail call <16 x i16> @llvm.ctpop.v16i16(<16 x i16> %0)
3297 %3 = icmp ult <16 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>
3298 %4 = sext <16 x i1> %3 to <16 x i16>
3302 define <8 x i32> @ugt_1_v8i32(<8 x i32> %0) {
3303 ; AVX1-LABEL: ugt_1_v8i32:
3305 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
3306 ; AVX1-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
3307 ; AVX1-NEXT: vpaddd %xmm2, %xmm1, %xmm3
3308 ; AVX1-NEXT: vpand %xmm3, %xmm1, %xmm1
3309 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
3310 ; AVX1-NEXT: vpcmpeqd %xmm3, %xmm1, %xmm1
3311 ; AVX1-NEXT: vpxor %xmm2, %xmm1, %xmm1
3312 ; AVX1-NEXT: vpaddd %xmm2, %xmm0, %xmm4
3313 ; AVX1-NEXT: vpand %xmm4, %xmm0, %xmm0
3314 ; AVX1-NEXT: vpcmpeqd %xmm3, %xmm0, %xmm0
3315 ; AVX1-NEXT: vpxor %xmm2, %xmm0, %xmm0
3316 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3319 ; AVX2-LABEL: ugt_1_v8i32:
3321 ; AVX2-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
3322 ; AVX2-NEXT: vpaddd %ymm1, %ymm0, %ymm2
3323 ; AVX2-NEXT: vpand %ymm2, %ymm0, %ymm0
3324 ; AVX2-NEXT: vpxor %xmm2, %xmm2, %xmm2
3325 ; AVX2-NEXT: vpcmpeqd %ymm2, %ymm0, %ymm0
3326 ; AVX2-NEXT: vpxor %ymm1, %ymm0, %ymm0
3329 ; AVX512VPOPCNTDQ-LABEL: ugt_1_v8i32:
3330 ; AVX512VPOPCNTDQ: # %bb.0:
3331 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3332 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3333 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [1,1,1,1,1,1,1,1]
3334 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3335 ; AVX512VPOPCNTDQ-NEXT: retq
3337 ; AVX512VPOPCNTDQVL-LABEL: ugt_1_v8i32:
3338 ; AVX512VPOPCNTDQVL: # %bb.0:
3339 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
3340 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [1,1,1,1,1,1,1,1]
3341 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3342 ; AVX512VPOPCNTDQVL-NEXT: retq
3344 ; BITALG_NOVLX-LABEL: ugt_1_v8i32:
3345 ; BITALG_NOVLX: # %bb.0:
3346 ; BITALG_NOVLX-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
3347 ; BITALG_NOVLX-NEXT: vpaddd %ymm1, %ymm0, %ymm1
3348 ; BITALG_NOVLX-NEXT: vpand %ymm1, %ymm0, %ymm0
3349 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
3350 ; BITALG_NOVLX-NEXT: vpcmpeqd %ymm1, %ymm0, %ymm0
3351 ; BITALG_NOVLX-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
3352 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
3353 ; BITALG_NOVLX-NEXT: retq
3355 ; BITALG-LABEL: ugt_1_v8i32:
3357 ; BITALG-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
3358 ; BITALG-NEXT: vpaddd %ymm1, %ymm0, %ymm1
3359 ; BITALG-NEXT: vpand %ymm1, %ymm0, %ymm0
3360 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3361 ; BITALG-NEXT: vpcmpeqd %ymm1, %ymm0, %ymm0
3362 ; BITALG-NEXT: vpternlogq $15, %ymm0, %ymm0, %ymm0
3364 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
3365 %3 = icmp ugt <8 x i32> %2, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
3366 %4 = sext <8 x i1> %3 to <8 x i32>
3370 define <8 x i32> @ult_2_v8i32(<8 x i32> %0) {
3371 ; AVX1-LABEL: ult_2_v8i32:
3373 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
3374 ; AVX1-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
3375 ; AVX1-NEXT: vpaddd %xmm2, %xmm1, %xmm3
3376 ; AVX1-NEXT: vpand %xmm3, %xmm1, %xmm1
3377 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
3378 ; AVX1-NEXT: vpcmpeqd %xmm3, %xmm1, %xmm1
3379 ; AVX1-NEXT: vpaddd %xmm2, %xmm0, %xmm2
3380 ; AVX1-NEXT: vpand %xmm2, %xmm0, %xmm0
3381 ; AVX1-NEXT: vpcmpeqd %xmm3, %xmm0, %xmm0
3382 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
3385 ; AVX2-LABEL: ult_2_v8i32:
3387 ; AVX2-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
3388 ; AVX2-NEXT: vpaddd %ymm1, %ymm0, %ymm1
3389 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3390 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3391 ; AVX2-NEXT: vpcmpeqd %ymm1, %ymm0, %ymm0
3394 ; AVX512VPOPCNTDQ-LABEL: ult_2_v8i32:
3395 ; AVX512VPOPCNTDQ: # %bb.0:
3396 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3397 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3398 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2]
3399 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3400 ; AVX512VPOPCNTDQ-NEXT: retq
3402 ; AVX512VPOPCNTDQVL-LABEL: ult_2_v8i32:
3403 ; AVX512VPOPCNTDQVL: # %bb.0:
3404 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
3405 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2]
3406 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3407 ; AVX512VPOPCNTDQVL-NEXT: retq
3409 ; BITALG_NOVLX-LABEL: ult_2_v8i32:
3410 ; BITALG_NOVLX: # %bb.0:
3411 ; BITALG_NOVLX-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
3412 ; BITALG_NOVLX-NEXT: vpaddd %ymm1, %ymm0, %ymm1
3413 ; BITALG_NOVLX-NEXT: vpand %ymm1, %ymm0, %ymm0
3414 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
3415 ; BITALG_NOVLX-NEXT: vpcmpeqd %ymm1, %ymm0, %ymm0
3416 ; BITALG_NOVLX-NEXT: retq
3418 ; BITALG-LABEL: ult_2_v8i32:
3420 ; BITALG-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
3421 ; BITALG-NEXT: vpaddd %ymm1, %ymm0, %ymm1
3422 ; BITALG-NEXT: vpand %ymm1, %ymm0, %ymm0
3423 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3424 ; BITALG-NEXT: vpcmpeqd %ymm1, %ymm0, %ymm0
3426 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
3427 %3 = icmp ult <8 x i32> %2, <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>
3428 %4 = sext <8 x i1> %3 to <8 x i32>
3432 define <8 x i32> @ugt_2_v8i32(<8 x i32> %0) {
3433 ; AVX1-LABEL: ugt_2_v8i32:
3435 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3436 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
3437 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3438 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
3439 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
3440 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
3441 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3442 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3443 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
3444 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
3445 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
3446 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
3447 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
3448 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
3449 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
3450 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
3451 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
3452 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
3453 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
3454 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
3455 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
3456 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
3457 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
3458 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
3459 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
3460 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
3461 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [2,2,2,2]
3462 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
3463 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
3464 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3467 ; AVX2-LABEL: ugt_2_v8i32:
3469 ; AVX2-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]
3470 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
3471 ; AVX2-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]
3472 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
3473 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3474 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
3475 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3476 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3477 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
3478 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3479 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3480 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3481 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3482 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3483 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3484 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2]
3485 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3488 ; AVX512VPOPCNTDQ-LABEL: ugt_2_v8i32:
3489 ; AVX512VPOPCNTDQ: # %bb.0:
3490 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3491 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3492 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2]
3493 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3494 ; AVX512VPOPCNTDQ-NEXT: retq
3496 ; AVX512VPOPCNTDQVL-LABEL: ugt_2_v8i32:
3497 ; AVX512VPOPCNTDQVL: # %bb.0:
3498 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
3499 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2]
3500 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3501 ; AVX512VPOPCNTDQVL-NEXT: retq
3503 ; BITALG_NOVLX-LABEL: ugt_2_v8i32:
3504 ; BITALG_NOVLX: # %bb.0:
3505 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3506 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
3507 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
3508 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3509 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3510 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3511 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3512 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3513 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2]
3514 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3515 ; BITALG_NOVLX-NEXT: retq
3517 ; BITALG-LABEL: ugt_2_v8i32:
3519 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
3520 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3521 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3522 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3523 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3524 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3525 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3526 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2]
3527 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3529 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
3530 %3 = icmp ugt <8 x i32> %2, <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>
3531 %4 = sext <8 x i1> %3 to <8 x i32>
3535 define <8 x i32> @ult_3_v8i32(<8 x i32> %0) {
3536 ; AVX1-LABEL: ult_3_v8i32:
3538 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3539 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
3540 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3541 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
3542 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
3543 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
3544 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3545 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3546 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
3547 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
3548 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
3549 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
3550 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
3551 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
3552 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
3553 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
3554 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
3555 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
3556 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
3557 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
3558 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
3559 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
3560 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
3561 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
3562 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
3563 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
3564 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [3,3,3,3]
3565 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
3566 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
3567 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3570 ; AVX2-LABEL: ult_3_v8i32:
3572 ; AVX2-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]
3573 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
3574 ; AVX2-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]
3575 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
3576 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3577 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
3578 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3579 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3580 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
3581 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3582 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3583 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3584 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3585 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3586 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3587 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3]
3588 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3591 ; AVX512VPOPCNTDQ-LABEL: ult_3_v8i32:
3592 ; AVX512VPOPCNTDQ: # %bb.0:
3593 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3594 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3595 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3]
3596 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3597 ; AVX512VPOPCNTDQ-NEXT: retq
3599 ; AVX512VPOPCNTDQVL-LABEL: ult_3_v8i32:
3600 ; AVX512VPOPCNTDQVL: # %bb.0:
3601 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
3602 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3]
3603 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3604 ; AVX512VPOPCNTDQVL-NEXT: retq
3606 ; BITALG_NOVLX-LABEL: ult_3_v8i32:
3607 ; BITALG_NOVLX: # %bb.0:
3608 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3609 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
3610 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
3611 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3612 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3613 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3614 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3615 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3616 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3]
3617 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3618 ; BITALG_NOVLX-NEXT: retq
3620 ; BITALG-LABEL: ult_3_v8i32:
3622 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
3623 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3624 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3625 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3626 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3627 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3628 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3629 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3]
3630 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3632 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
3633 %3 = icmp ult <8 x i32> %2, <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
3634 %4 = sext <8 x i1> %3 to <8 x i32>
3638 define <8 x i32> @ugt_3_v8i32(<8 x i32> %0) {
3639 ; AVX1-LABEL: ugt_3_v8i32:
3641 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3642 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
3643 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3644 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
3645 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
3646 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
3647 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3648 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3649 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
3650 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
3651 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
3652 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
3653 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
3654 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
3655 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
3656 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
3657 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
3658 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
3659 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
3660 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
3661 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
3662 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
3663 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
3664 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
3665 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
3666 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
3667 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [3,3,3,3]
3668 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
3669 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
3670 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3673 ; AVX2-LABEL: ugt_3_v8i32:
3675 ; AVX2-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]
3676 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
3677 ; AVX2-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]
3678 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
3679 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3680 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
3681 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3682 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3683 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
3684 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3685 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3686 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3687 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3688 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3689 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3690 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3]
3691 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3694 ; AVX512VPOPCNTDQ-LABEL: ugt_3_v8i32:
3695 ; AVX512VPOPCNTDQ: # %bb.0:
3696 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3697 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3698 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3]
3699 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3700 ; AVX512VPOPCNTDQ-NEXT: retq
3702 ; AVX512VPOPCNTDQVL-LABEL: ugt_3_v8i32:
3703 ; AVX512VPOPCNTDQVL: # %bb.0:
3704 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
3705 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3]
3706 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3707 ; AVX512VPOPCNTDQVL-NEXT: retq
3709 ; BITALG_NOVLX-LABEL: ugt_3_v8i32:
3710 ; BITALG_NOVLX: # %bb.0:
3711 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3712 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
3713 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
3714 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3715 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3716 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3717 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3718 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3719 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3]
3720 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3721 ; BITALG_NOVLX-NEXT: retq
3723 ; BITALG-LABEL: ugt_3_v8i32:
3725 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
3726 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3727 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3728 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3729 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3730 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3731 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3732 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3]
3733 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3735 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
3736 %3 = icmp ugt <8 x i32> %2, <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
3737 %4 = sext <8 x i1> %3 to <8 x i32>
3741 define <8 x i32> @ult_4_v8i32(<8 x i32> %0) {
3742 ; AVX1-LABEL: ult_4_v8i32:
3744 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3745 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
3746 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3747 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
3748 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
3749 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
3750 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3751 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3752 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
3753 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
3754 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
3755 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
3756 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
3757 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
3758 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
3759 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
3760 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
3761 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
3762 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
3763 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
3764 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
3765 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
3766 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
3767 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
3768 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
3769 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
3770 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [4,4,4,4]
3771 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
3772 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
3773 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3776 ; AVX2-LABEL: ult_4_v8i32:
3778 ; AVX2-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]
3779 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
3780 ; AVX2-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]
3781 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
3782 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3783 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
3784 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3785 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3786 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
3787 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3788 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3789 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3790 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3791 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3792 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3793 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4]
3794 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3797 ; AVX512VPOPCNTDQ-LABEL: ult_4_v8i32:
3798 ; AVX512VPOPCNTDQ: # %bb.0:
3799 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3800 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3801 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4]
3802 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3803 ; AVX512VPOPCNTDQ-NEXT: retq
3805 ; AVX512VPOPCNTDQVL-LABEL: ult_4_v8i32:
3806 ; AVX512VPOPCNTDQVL: # %bb.0:
3807 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
3808 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4]
3809 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3810 ; AVX512VPOPCNTDQVL-NEXT: retq
3812 ; BITALG_NOVLX-LABEL: ult_4_v8i32:
3813 ; BITALG_NOVLX: # %bb.0:
3814 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3815 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
3816 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
3817 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3818 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3819 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3820 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3821 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3822 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4]
3823 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3824 ; BITALG_NOVLX-NEXT: retq
3826 ; BITALG-LABEL: ult_4_v8i32:
3828 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
3829 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3830 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3831 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3832 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3833 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3834 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3835 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4]
3836 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
3838 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
3839 %3 = icmp ult <8 x i32> %2, <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
3840 %4 = sext <8 x i1> %3 to <8 x i32>
3844 define <8 x i32> @ugt_4_v8i32(<8 x i32> %0) {
3845 ; AVX1-LABEL: ugt_4_v8i32:
3847 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3848 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
3849 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3850 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
3851 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
3852 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
3853 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3854 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3855 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
3856 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
3857 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
3858 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
3859 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
3860 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
3861 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
3862 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
3863 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
3864 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
3865 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
3866 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
3867 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
3868 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
3869 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
3870 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
3871 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
3872 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
3873 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [4,4,4,4]
3874 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
3875 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
3876 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3879 ; AVX2-LABEL: ugt_4_v8i32:
3881 ; AVX2-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]
3882 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
3883 ; AVX2-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]
3884 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
3885 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3886 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
3887 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3888 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3889 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
3890 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3891 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3892 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3893 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3894 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3895 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3896 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4]
3897 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3900 ; AVX512VPOPCNTDQ-LABEL: ugt_4_v8i32:
3901 ; AVX512VPOPCNTDQ: # %bb.0:
3902 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3903 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3904 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4]
3905 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3906 ; AVX512VPOPCNTDQ-NEXT: retq
3908 ; AVX512VPOPCNTDQVL-LABEL: ugt_4_v8i32:
3909 ; AVX512VPOPCNTDQVL: # %bb.0:
3910 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
3911 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4]
3912 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3913 ; AVX512VPOPCNTDQVL-NEXT: retq
3915 ; BITALG_NOVLX-LABEL: ugt_4_v8i32:
3916 ; BITALG_NOVLX: # %bb.0:
3917 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
3918 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
3919 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
3920 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3921 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3922 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3923 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3924 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3925 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4]
3926 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3927 ; BITALG_NOVLX-NEXT: retq
3929 ; BITALG-LABEL: ugt_4_v8i32:
3931 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
3932 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3933 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3934 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3935 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3936 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3937 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3938 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4]
3939 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
3941 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
3942 %3 = icmp ugt <8 x i32> %2, <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
3943 %4 = sext <8 x i1> %3 to <8 x i32>
3947 define <8 x i32> @ult_5_v8i32(<8 x i32> %0) {
3948 ; AVX1-LABEL: ult_5_v8i32:
3950 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3951 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
3952 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3953 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
3954 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
3955 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
3956 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
3957 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
3958 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
3959 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
3960 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
3961 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
3962 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
3963 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
3964 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
3965 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
3966 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
3967 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
3968 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
3969 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
3970 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
3971 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
3972 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
3973 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
3974 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
3975 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
3976 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [5,5,5,5]
3977 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
3978 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
3979 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
3982 ; AVX2-LABEL: ult_5_v8i32:
3984 ; AVX2-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]
3985 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
3986 ; AVX2-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]
3987 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
3988 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3989 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
3990 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
3991 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3992 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
3993 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
3994 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
3995 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
3996 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
3997 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
3998 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3999 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5]
4000 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4003 ; AVX512VPOPCNTDQ-LABEL: ult_5_v8i32:
4004 ; AVX512VPOPCNTDQ: # %bb.0:
4005 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4006 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4007 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5]
4008 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4009 ; AVX512VPOPCNTDQ-NEXT: retq
4011 ; AVX512VPOPCNTDQVL-LABEL: ult_5_v8i32:
4012 ; AVX512VPOPCNTDQVL: # %bb.0:
4013 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
4014 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5]
4015 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4016 ; AVX512VPOPCNTDQVL-NEXT: retq
4018 ; BITALG_NOVLX-LABEL: ult_5_v8i32:
4019 ; BITALG_NOVLX: # %bb.0:
4020 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4021 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
4022 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
4023 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4024 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4025 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4026 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4027 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4028 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5]
4029 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4030 ; BITALG_NOVLX-NEXT: retq
4032 ; BITALG-LABEL: ult_5_v8i32:
4034 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
4035 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4036 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4037 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4038 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4039 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4040 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4041 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5]
4042 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4044 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
4045 %3 = icmp ult <8 x i32> %2, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
4046 %4 = sext <8 x i1> %3 to <8 x i32>
4050 define <8 x i32> @ugt_5_v8i32(<8 x i32> %0) {
4051 ; AVX1-LABEL: ugt_5_v8i32:
4053 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4054 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
4055 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4056 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
4057 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
4058 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
4059 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
4060 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
4061 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
4062 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
4063 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
4064 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
4065 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
4066 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
4067 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4068 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
4069 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
4070 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
4071 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
4072 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
4073 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
4074 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
4075 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
4076 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
4077 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
4078 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
4079 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [5,5,5,5]
4080 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
4081 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
4082 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4085 ; AVX2-LABEL: ugt_5_v8i32:
4087 ; AVX2-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]
4088 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
4089 ; AVX2-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]
4090 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
4091 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
4092 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
4093 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
4094 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
4095 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
4096 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
4097 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4098 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4099 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4100 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4101 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4102 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5]
4103 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4106 ; AVX512VPOPCNTDQ-LABEL: ugt_5_v8i32:
4107 ; AVX512VPOPCNTDQ: # %bb.0:
4108 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4109 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4110 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5]
4111 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4112 ; AVX512VPOPCNTDQ-NEXT: retq
4114 ; AVX512VPOPCNTDQVL-LABEL: ugt_5_v8i32:
4115 ; AVX512VPOPCNTDQVL: # %bb.0:
4116 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
4117 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5]
4118 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4119 ; AVX512VPOPCNTDQVL-NEXT: retq
4121 ; BITALG_NOVLX-LABEL: ugt_5_v8i32:
4122 ; BITALG_NOVLX: # %bb.0:
4123 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4124 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
4125 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
4126 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4127 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4128 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4129 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4130 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4131 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5]
4132 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4133 ; BITALG_NOVLX-NEXT: retq
4135 ; BITALG-LABEL: ugt_5_v8i32:
4137 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
4138 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4139 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4140 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4141 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4142 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4143 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4144 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5]
4145 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4147 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
4148 %3 = icmp ugt <8 x i32> %2, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
4149 %4 = sext <8 x i1> %3 to <8 x i32>
4153 define <8 x i32> @ult_6_v8i32(<8 x i32> %0) {
4154 ; AVX1-LABEL: ult_6_v8i32:
4156 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4157 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
4158 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4159 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
4160 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
4161 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
4162 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
4163 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
4164 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
4165 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
4166 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
4167 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
4168 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
4169 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
4170 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4171 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
4172 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
4173 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
4174 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
4175 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
4176 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
4177 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
4178 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
4179 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
4180 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
4181 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
4182 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [6,6,6,6]
4183 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
4184 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
4185 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4188 ; AVX2-LABEL: ult_6_v8i32:
4190 ; AVX2-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]
4191 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
4192 ; AVX2-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]
4193 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
4194 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
4195 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
4196 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
4197 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
4198 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
4199 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
4200 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4201 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4202 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4203 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4204 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4205 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6]
4206 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4209 ; AVX512VPOPCNTDQ-LABEL: ult_6_v8i32:
4210 ; AVX512VPOPCNTDQ: # %bb.0:
4211 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4212 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4213 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6]
4214 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4215 ; AVX512VPOPCNTDQ-NEXT: retq
4217 ; AVX512VPOPCNTDQVL-LABEL: ult_6_v8i32:
4218 ; AVX512VPOPCNTDQVL: # %bb.0:
4219 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
4220 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6]
4221 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4222 ; AVX512VPOPCNTDQVL-NEXT: retq
4224 ; BITALG_NOVLX-LABEL: ult_6_v8i32:
4225 ; BITALG_NOVLX: # %bb.0:
4226 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4227 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
4228 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
4229 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4230 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4231 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4232 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4233 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4234 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6]
4235 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4236 ; BITALG_NOVLX-NEXT: retq
4238 ; BITALG-LABEL: ult_6_v8i32:
4240 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
4241 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4242 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4243 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4244 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4245 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4246 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4247 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6]
4248 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4250 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
4251 %3 = icmp ult <8 x i32> %2, <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6>
4252 %4 = sext <8 x i1> %3 to <8 x i32>
4256 define <8 x i32> @ugt_6_v8i32(<8 x i32> %0) {
4257 ; AVX1-LABEL: ugt_6_v8i32:
4259 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4260 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
4261 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4262 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
4263 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
4264 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
4265 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
4266 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
4267 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
4268 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
4269 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
4270 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
4271 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
4272 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
4273 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4274 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
4275 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
4276 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
4277 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
4278 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
4279 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
4280 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
4281 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
4282 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
4283 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
4284 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
4285 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [6,6,6,6]
4286 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
4287 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
4288 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4291 ; AVX2-LABEL: ugt_6_v8i32:
4293 ; AVX2-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]
4294 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
4295 ; AVX2-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]
4296 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
4297 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
4298 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
4299 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
4300 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
4301 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
4302 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
4303 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4304 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4305 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4306 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4307 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4308 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6]
4309 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4312 ; AVX512VPOPCNTDQ-LABEL: ugt_6_v8i32:
4313 ; AVX512VPOPCNTDQ: # %bb.0:
4314 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4315 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4316 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6]
4317 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4318 ; AVX512VPOPCNTDQ-NEXT: retq
4320 ; AVX512VPOPCNTDQVL-LABEL: ugt_6_v8i32:
4321 ; AVX512VPOPCNTDQVL: # %bb.0:
4322 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
4323 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6]
4324 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4325 ; AVX512VPOPCNTDQVL-NEXT: retq
4327 ; BITALG_NOVLX-LABEL: ugt_6_v8i32:
4328 ; BITALG_NOVLX: # %bb.0:
4329 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4330 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
4331 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
4332 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4333 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4334 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4335 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4336 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4337 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6]
4338 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4339 ; BITALG_NOVLX-NEXT: retq
4341 ; BITALG-LABEL: ugt_6_v8i32:
4343 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
4344 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4345 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4346 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4347 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4348 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4349 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4350 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6]
4351 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4353 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
4354 %3 = icmp ugt <8 x i32> %2, <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6>
4355 %4 = sext <8 x i1> %3 to <8 x i32>
4359 define <8 x i32> @ult_7_v8i32(<8 x i32> %0) {
4360 ; AVX1-LABEL: ult_7_v8i32:
4362 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4363 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
4364 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4365 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
4366 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
4367 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
4368 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
4369 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
4370 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
4371 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
4372 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
4373 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
4374 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
4375 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
4376 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4377 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
4378 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
4379 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
4380 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
4381 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
4382 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
4383 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
4384 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
4385 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
4386 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
4387 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
4388 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [7,7,7,7]
4389 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
4390 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
4391 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4394 ; AVX2-LABEL: ult_7_v8i32:
4396 ; AVX2-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]
4397 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
4398 ; AVX2-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]
4399 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
4400 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
4401 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
4402 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
4403 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
4404 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
4405 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
4406 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4407 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4408 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4409 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4410 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4411 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
4412 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4415 ; AVX512VPOPCNTDQ-LABEL: ult_7_v8i32:
4416 ; AVX512VPOPCNTDQ: # %bb.0:
4417 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4418 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4419 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
4420 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4421 ; AVX512VPOPCNTDQ-NEXT: retq
4423 ; AVX512VPOPCNTDQVL-LABEL: ult_7_v8i32:
4424 ; AVX512VPOPCNTDQVL: # %bb.0:
4425 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
4426 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
4427 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4428 ; AVX512VPOPCNTDQVL-NEXT: retq
4430 ; BITALG_NOVLX-LABEL: ult_7_v8i32:
4431 ; BITALG_NOVLX: # %bb.0:
4432 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4433 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
4434 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
4435 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4436 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4437 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4438 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4439 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4440 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
4441 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4442 ; BITALG_NOVLX-NEXT: retq
4444 ; BITALG-LABEL: ult_7_v8i32:
4446 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
4447 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4448 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4449 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4450 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4451 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4452 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4453 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
4454 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4456 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
4457 %3 = icmp ult <8 x i32> %2, <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7>
4458 %4 = sext <8 x i1> %3 to <8 x i32>
4462 define <8 x i32> @ugt_7_v8i32(<8 x i32> %0) {
4463 ; AVX1-LABEL: ugt_7_v8i32:
4465 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4466 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
4467 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4468 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
4469 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
4470 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
4471 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
4472 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
4473 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
4474 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
4475 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
4476 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
4477 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
4478 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
4479 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4480 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
4481 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
4482 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
4483 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
4484 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
4485 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
4486 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
4487 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
4488 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
4489 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
4490 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
4491 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [7,7,7,7]
4492 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
4493 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
4494 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4497 ; AVX2-LABEL: ugt_7_v8i32:
4499 ; AVX2-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]
4500 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
4501 ; AVX2-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]
4502 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
4503 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
4504 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
4505 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
4506 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
4507 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
4508 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
4509 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4510 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4511 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4512 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4513 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4514 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
4515 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4518 ; AVX512VPOPCNTDQ-LABEL: ugt_7_v8i32:
4519 ; AVX512VPOPCNTDQ: # %bb.0:
4520 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4521 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4522 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
4523 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4524 ; AVX512VPOPCNTDQ-NEXT: retq
4526 ; AVX512VPOPCNTDQVL-LABEL: ugt_7_v8i32:
4527 ; AVX512VPOPCNTDQVL: # %bb.0:
4528 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
4529 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
4530 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4531 ; AVX512VPOPCNTDQVL-NEXT: retq
4533 ; BITALG_NOVLX-LABEL: ugt_7_v8i32:
4534 ; BITALG_NOVLX: # %bb.0:
4535 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4536 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
4537 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
4538 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4539 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4540 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4541 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4542 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4543 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
4544 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4545 ; BITALG_NOVLX-NEXT: retq
4547 ; BITALG-LABEL: ugt_7_v8i32:
4549 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
4550 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4551 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4552 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4553 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4554 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4555 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4556 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7]
4557 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4559 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
4560 %3 = icmp ugt <8 x i32> %2, <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7>
4561 %4 = sext <8 x i1> %3 to <8 x i32>
4565 define <8 x i32> @ult_8_v8i32(<8 x i32> %0) {
4566 ; AVX1-LABEL: ult_8_v8i32:
4568 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4569 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
4570 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4571 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
4572 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
4573 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
4574 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
4575 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
4576 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
4577 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
4578 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
4579 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
4580 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
4581 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
4582 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4583 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
4584 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
4585 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
4586 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
4587 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
4588 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
4589 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
4590 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
4591 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
4592 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
4593 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
4594 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [8,8,8,8]
4595 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
4596 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
4597 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4600 ; AVX2-LABEL: ult_8_v8i32:
4602 ; AVX2-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]
4603 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
4604 ; AVX2-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]
4605 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
4606 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
4607 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
4608 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
4609 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
4610 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
4611 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
4612 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4613 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4614 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4615 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4616 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4617 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8]
4618 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4621 ; AVX512VPOPCNTDQ-LABEL: ult_8_v8i32:
4622 ; AVX512VPOPCNTDQ: # %bb.0:
4623 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4624 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4625 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8]
4626 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4627 ; AVX512VPOPCNTDQ-NEXT: retq
4629 ; AVX512VPOPCNTDQVL-LABEL: ult_8_v8i32:
4630 ; AVX512VPOPCNTDQVL: # %bb.0:
4631 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
4632 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8]
4633 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4634 ; AVX512VPOPCNTDQVL-NEXT: retq
4636 ; BITALG_NOVLX-LABEL: ult_8_v8i32:
4637 ; BITALG_NOVLX: # %bb.0:
4638 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4639 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
4640 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
4641 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4642 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4643 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4644 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4645 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4646 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8]
4647 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4648 ; BITALG_NOVLX-NEXT: retq
4650 ; BITALG-LABEL: ult_8_v8i32:
4652 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
4653 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4654 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4655 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4656 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4657 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4658 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4659 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8]
4660 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4662 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
4663 %3 = icmp ult <8 x i32> %2, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
4664 %4 = sext <8 x i1> %3 to <8 x i32>
4668 define <8 x i32> @ugt_8_v8i32(<8 x i32> %0) {
4669 ; AVX1-LABEL: ugt_8_v8i32:
4671 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4672 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
4673 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4674 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
4675 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
4676 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
4677 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
4678 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
4679 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
4680 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
4681 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
4682 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
4683 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
4684 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
4685 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4686 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
4687 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
4688 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
4689 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
4690 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
4691 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
4692 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
4693 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
4694 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
4695 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
4696 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
4697 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [8,8,8,8]
4698 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
4699 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
4700 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4703 ; AVX2-LABEL: ugt_8_v8i32:
4705 ; AVX2-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]
4706 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
4707 ; AVX2-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]
4708 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
4709 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
4710 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
4711 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
4712 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
4713 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
4714 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
4715 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4716 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4717 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4718 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4719 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4720 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8]
4721 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4724 ; AVX512VPOPCNTDQ-LABEL: ugt_8_v8i32:
4725 ; AVX512VPOPCNTDQ: # %bb.0:
4726 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4727 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4728 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8]
4729 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4730 ; AVX512VPOPCNTDQ-NEXT: retq
4732 ; AVX512VPOPCNTDQVL-LABEL: ugt_8_v8i32:
4733 ; AVX512VPOPCNTDQVL: # %bb.0:
4734 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
4735 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8]
4736 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4737 ; AVX512VPOPCNTDQVL-NEXT: retq
4739 ; BITALG_NOVLX-LABEL: ugt_8_v8i32:
4740 ; BITALG_NOVLX: # %bb.0:
4741 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4742 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
4743 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
4744 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4745 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4746 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4747 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4748 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4749 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8]
4750 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4751 ; BITALG_NOVLX-NEXT: retq
4753 ; BITALG-LABEL: ugt_8_v8i32:
4755 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
4756 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4757 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4758 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4759 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4760 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4761 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4762 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8]
4763 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4765 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
4766 %3 = icmp ugt <8 x i32> %2, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
4767 %4 = sext <8 x i1> %3 to <8 x i32>
4771 define <8 x i32> @ult_9_v8i32(<8 x i32> %0) {
4772 ; AVX1-LABEL: ult_9_v8i32:
4774 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4775 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
4776 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4777 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
4778 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
4779 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
4780 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
4781 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
4782 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
4783 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
4784 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
4785 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
4786 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
4787 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
4788 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4789 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
4790 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
4791 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
4792 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
4793 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
4794 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
4795 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
4796 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
4797 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
4798 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
4799 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
4800 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [9,9,9,9]
4801 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
4802 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
4803 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4806 ; AVX2-LABEL: ult_9_v8i32:
4808 ; AVX2-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]
4809 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
4810 ; AVX2-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]
4811 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
4812 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
4813 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
4814 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
4815 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
4816 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
4817 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
4818 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4819 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4820 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4821 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4822 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4823 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9]
4824 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4827 ; AVX512VPOPCNTDQ-LABEL: ult_9_v8i32:
4828 ; AVX512VPOPCNTDQ: # %bb.0:
4829 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4830 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4831 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9]
4832 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4833 ; AVX512VPOPCNTDQ-NEXT: retq
4835 ; AVX512VPOPCNTDQVL-LABEL: ult_9_v8i32:
4836 ; AVX512VPOPCNTDQVL: # %bb.0:
4837 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
4838 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9]
4839 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4840 ; AVX512VPOPCNTDQVL-NEXT: retq
4842 ; BITALG_NOVLX-LABEL: ult_9_v8i32:
4843 ; BITALG_NOVLX: # %bb.0:
4844 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4845 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
4846 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
4847 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4848 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4849 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4850 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4851 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4852 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9]
4853 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4854 ; BITALG_NOVLX-NEXT: retq
4856 ; BITALG-LABEL: ult_9_v8i32:
4858 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
4859 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4860 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4861 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4862 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4863 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4864 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4865 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9]
4866 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
4868 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
4869 %3 = icmp ult <8 x i32> %2, <i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9>
4870 %4 = sext <8 x i1> %3 to <8 x i32>
4874 define <8 x i32> @ugt_9_v8i32(<8 x i32> %0) {
4875 ; AVX1-LABEL: ugt_9_v8i32:
4877 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4878 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
4879 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4880 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
4881 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
4882 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
4883 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
4884 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
4885 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
4886 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
4887 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
4888 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
4889 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
4890 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
4891 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4892 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
4893 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
4894 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
4895 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
4896 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
4897 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
4898 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
4899 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
4900 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
4901 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
4902 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
4903 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [9,9,9,9]
4904 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
4905 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
4906 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
4909 ; AVX2-LABEL: ugt_9_v8i32:
4911 ; AVX2-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]
4912 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
4913 ; AVX2-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]
4914 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
4915 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
4916 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
4917 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
4918 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
4919 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
4920 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
4921 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4922 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4923 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4924 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4925 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4926 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9]
4927 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4930 ; AVX512VPOPCNTDQ-LABEL: ugt_9_v8i32:
4931 ; AVX512VPOPCNTDQ: # %bb.0:
4932 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4933 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4934 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9]
4935 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4936 ; AVX512VPOPCNTDQ-NEXT: retq
4938 ; AVX512VPOPCNTDQVL-LABEL: ugt_9_v8i32:
4939 ; AVX512VPOPCNTDQVL: # %bb.0:
4940 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
4941 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9]
4942 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4943 ; AVX512VPOPCNTDQVL-NEXT: retq
4945 ; BITALG_NOVLX-LABEL: ugt_9_v8i32:
4946 ; BITALG_NOVLX: # %bb.0:
4947 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
4948 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
4949 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
4950 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4951 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4952 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4953 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4954 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4955 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9]
4956 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4957 ; BITALG_NOVLX-NEXT: retq
4959 ; BITALG-LABEL: ugt_9_v8i32:
4961 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
4962 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4963 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
4964 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
4965 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
4966 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
4967 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4968 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9]
4969 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
4971 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
4972 %3 = icmp ugt <8 x i32> %2, <i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9>
4973 %4 = sext <8 x i1> %3 to <8 x i32>
4977 define <8 x i32> @ult_10_v8i32(<8 x i32> %0) {
4978 ; AVX1-LABEL: ult_10_v8i32:
4980 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4981 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
4982 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4983 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
4984 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
4985 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
4986 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
4987 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
4988 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
4989 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
4990 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
4991 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
4992 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
4993 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
4994 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
4995 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
4996 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
4997 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
4998 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
4999 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
5000 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
5001 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
5002 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
5003 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
5004 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
5005 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
5006 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [10,10,10,10]
5007 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
5008 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
5009 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5012 ; AVX2-LABEL: ult_10_v8i32:
5014 ; AVX2-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]
5015 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
5016 ; AVX2-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]
5017 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
5018 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
5019 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
5020 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
5021 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
5022 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
5023 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
5024 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5025 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5026 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5027 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5028 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5029 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10]
5030 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5033 ; AVX512VPOPCNTDQ-LABEL: ult_10_v8i32:
5034 ; AVX512VPOPCNTDQ: # %bb.0:
5035 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5036 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5037 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10]
5038 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5039 ; AVX512VPOPCNTDQ-NEXT: retq
5041 ; AVX512VPOPCNTDQVL-LABEL: ult_10_v8i32:
5042 ; AVX512VPOPCNTDQVL: # %bb.0:
5043 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
5044 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10]
5045 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5046 ; AVX512VPOPCNTDQVL-NEXT: retq
5048 ; BITALG_NOVLX-LABEL: ult_10_v8i32:
5049 ; BITALG_NOVLX: # %bb.0:
5050 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5051 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
5052 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
5053 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5054 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5055 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5056 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5057 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5058 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10]
5059 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5060 ; BITALG_NOVLX-NEXT: retq
5062 ; BITALG-LABEL: ult_10_v8i32:
5064 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
5065 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5066 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5067 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5068 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5069 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5070 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5071 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10]
5072 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5074 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
5075 %3 = icmp ult <8 x i32> %2, <i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10>
5076 %4 = sext <8 x i1> %3 to <8 x i32>
5080 define <8 x i32> @ugt_10_v8i32(<8 x i32> %0) {
5081 ; AVX1-LABEL: ugt_10_v8i32:
5083 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5084 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
5085 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5086 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
5087 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
5088 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
5089 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
5090 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
5091 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
5092 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
5093 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
5094 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
5095 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
5096 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
5097 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
5098 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
5099 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
5100 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
5101 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
5102 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
5103 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
5104 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
5105 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
5106 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
5107 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
5108 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
5109 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [10,10,10,10]
5110 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
5111 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
5112 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5115 ; AVX2-LABEL: ugt_10_v8i32:
5117 ; AVX2-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]
5118 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
5119 ; AVX2-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]
5120 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
5121 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
5122 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
5123 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
5124 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
5125 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
5126 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
5127 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5128 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5129 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5130 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5131 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5132 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10]
5133 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5136 ; AVX512VPOPCNTDQ-LABEL: ugt_10_v8i32:
5137 ; AVX512VPOPCNTDQ: # %bb.0:
5138 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5139 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5140 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10]
5141 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5142 ; AVX512VPOPCNTDQ-NEXT: retq
5144 ; AVX512VPOPCNTDQVL-LABEL: ugt_10_v8i32:
5145 ; AVX512VPOPCNTDQVL: # %bb.0:
5146 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
5147 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10]
5148 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5149 ; AVX512VPOPCNTDQVL-NEXT: retq
5151 ; BITALG_NOVLX-LABEL: ugt_10_v8i32:
5152 ; BITALG_NOVLX: # %bb.0:
5153 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5154 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
5155 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
5156 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5157 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5158 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5159 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5160 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5161 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10]
5162 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5163 ; BITALG_NOVLX-NEXT: retq
5165 ; BITALG-LABEL: ugt_10_v8i32:
5167 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
5168 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5169 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5170 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5171 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5172 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5173 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5174 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10]
5175 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5177 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
5178 %3 = icmp ugt <8 x i32> %2, <i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10>
5179 %4 = sext <8 x i1> %3 to <8 x i32>
5183 define <8 x i32> @ult_11_v8i32(<8 x i32> %0) {
5184 ; AVX1-LABEL: ult_11_v8i32:
5186 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5187 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
5188 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5189 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
5190 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
5191 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
5192 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
5193 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
5194 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
5195 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
5196 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
5197 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
5198 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
5199 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
5200 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
5201 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
5202 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
5203 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
5204 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
5205 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
5206 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
5207 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
5208 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
5209 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
5210 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
5211 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
5212 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [11,11,11,11]
5213 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
5214 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
5215 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5218 ; AVX2-LABEL: ult_11_v8i32:
5220 ; AVX2-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]
5221 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
5222 ; AVX2-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]
5223 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
5224 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
5225 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
5226 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
5227 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
5228 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
5229 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
5230 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5231 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5232 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5233 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5234 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5235 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11]
5236 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5239 ; AVX512VPOPCNTDQ-LABEL: ult_11_v8i32:
5240 ; AVX512VPOPCNTDQ: # %bb.0:
5241 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5242 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5243 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11]
5244 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5245 ; AVX512VPOPCNTDQ-NEXT: retq
5247 ; AVX512VPOPCNTDQVL-LABEL: ult_11_v8i32:
5248 ; AVX512VPOPCNTDQVL: # %bb.0:
5249 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
5250 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11]
5251 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5252 ; AVX512VPOPCNTDQVL-NEXT: retq
5254 ; BITALG_NOVLX-LABEL: ult_11_v8i32:
5255 ; BITALG_NOVLX: # %bb.0:
5256 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5257 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
5258 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
5259 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5260 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5261 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5262 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5263 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5264 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11]
5265 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5266 ; BITALG_NOVLX-NEXT: retq
5268 ; BITALG-LABEL: ult_11_v8i32:
5270 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
5271 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5272 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5273 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5274 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5275 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5276 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5277 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11]
5278 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5280 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
5281 %3 = icmp ult <8 x i32> %2, <i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11>
5282 %4 = sext <8 x i1> %3 to <8 x i32>
5286 define <8 x i32> @ugt_11_v8i32(<8 x i32> %0) {
5287 ; AVX1-LABEL: ugt_11_v8i32:
5289 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5290 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
5291 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5292 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
5293 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
5294 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
5295 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
5296 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
5297 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
5298 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
5299 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
5300 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
5301 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
5302 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
5303 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
5304 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
5305 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
5306 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
5307 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
5308 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
5309 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
5310 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
5311 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
5312 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
5313 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
5314 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
5315 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [11,11,11,11]
5316 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
5317 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
5318 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5321 ; AVX2-LABEL: ugt_11_v8i32:
5323 ; AVX2-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]
5324 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
5325 ; AVX2-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]
5326 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
5327 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
5328 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
5329 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
5330 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
5331 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
5332 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
5333 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5334 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5335 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5336 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5337 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5338 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11]
5339 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5342 ; AVX512VPOPCNTDQ-LABEL: ugt_11_v8i32:
5343 ; AVX512VPOPCNTDQ: # %bb.0:
5344 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5345 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5346 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11]
5347 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5348 ; AVX512VPOPCNTDQ-NEXT: retq
5350 ; AVX512VPOPCNTDQVL-LABEL: ugt_11_v8i32:
5351 ; AVX512VPOPCNTDQVL: # %bb.0:
5352 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
5353 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11]
5354 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5355 ; AVX512VPOPCNTDQVL-NEXT: retq
5357 ; BITALG_NOVLX-LABEL: ugt_11_v8i32:
5358 ; BITALG_NOVLX: # %bb.0:
5359 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5360 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
5361 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
5362 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5363 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5364 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5365 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5366 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5367 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11]
5368 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5369 ; BITALG_NOVLX-NEXT: retq
5371 ; BITALG-LABEL: ugt_11_v8i32:
5373 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
5374 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5375 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5376 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5377 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5378 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5379 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5380 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11]
5381 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5383 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
5384 %3 = icmp ugt <8 x i32> %2, <i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11>
5385 %4 = sext <8 x i1> %3 to <8 x i32>
5389 define <8 x i32> @ult_12_v8i32(<8 x i32> %0) {
5390 ; AVX1-LABEL: ult_12_v8i32:
5392 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5393 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
5394 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5395 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
5396 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
5397 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
5398 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
5399 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
5400 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
5401 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
5402 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
5403 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
5404 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
5405 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
5406 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
5407 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
5408 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
5409 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
5410 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
5411 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
5412 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
5413 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
5414 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
5415 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
5416 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
5417 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
5418 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [12,12,12,12]
5419 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
5420 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
5421 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5424 ; AVX2-LABEL: ult_12_v8i32:
5426 ; AVX2-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]
5427 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
5428 ; AVX2-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]
5429 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
5430 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
5431 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
5432 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
5433 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
5434 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
5435 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
5436 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5437 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5438 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5439 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5440 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5441 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12]
5442 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5445 ; AVX512VPOPCNTDQ-LABEL: ult_12_v8i32:
5446 ; AVX512VPOPCNTDQ: # %bb.0:
5447 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5448 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5449 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12]
5450 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5451 ; AVX512VPOPCNTDQ-NEXT: retq
5453 ; AVX512VPOPCNTDQVL-LABEL: ult_12_v8i32:
5454 ; AVX512VPOPCNTDQVL: # %bb.0:
5455 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
5456 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12]
5457 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5458 ; AVX512VPOPCNTDQVL-NEXT: retq
5460 ; BITALG_NOVLX-LABEL: ult_12_v8i32:
5461 ; BITALG_NOVLX: # %bb.0:
5462 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5463 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
5464 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
5465 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5466 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5467 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5468 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5469 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5470 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12]
5471 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5472 ; BITALG_NOVLX-NEXT: retq
5474 ; BITALG-LABEL: ult_12_v8i32:
5476 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
5477 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5478 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5479 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5480 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5481 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5482 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5483 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12]
5484 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5486 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
5487 %3 = icmp ult <8 x i32> %2, <i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12>
5488 %4 = sext <8 x i1> %3 to <8 x i32>
5492 define <8 x i32> @ugt_12_v8i32(<8 x i32> %0) {
5493 ; AVX1-LABEL: ugt_12_v8i32:
5495 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5496 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
5497 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5498 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
5499 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
5500 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
5501 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
5502 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
5503 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
5504 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
5505 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
5506 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
5507 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
5508 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
5509 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
5510 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
5511 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
5512 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
5513 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
5514 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
5515 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
5516 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
5517 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
5518 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
5519 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
5520 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
5521 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [12,12,12,12]
5522 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
5523 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
5524 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5527 ; AVX2-LABEL: ugt_12_v8i32:
5529 ; AVX2-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]
5530 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
5531 ; AVX2-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]
5532 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
5533 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
5534 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
5535 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
5536 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
5537 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
5538 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
5539 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5540 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5541 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5542 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5543 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5544 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12]
5545 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5548 ; AVX512VPOPCNTDQ-LABEL: ugt_12_v8i32:
5549 ; AVX512VPOPCNTDQ: # %bb.0:
5550 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5551 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5552 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12]
5553 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5554 ; AVX512VPOPCNTDQ-NEXT: retq
5556 ; AVX512VPOPCNTDQVL-LABEL: ugt_12_v8i32:
5557 ; AVX512VPOPCNTDQVL: # %bb.0:
5558 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
5559 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12]
5560 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5561 ; AVX512VPOPCNTDQVL-NEXT: retq
5563 ; BITALG_NOVLX-LABEL: ugt_12_v8i32:
5564 ; BITALG_NOVLX: # %bb.0:
5565 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5566 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
5567 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
5568 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5569 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5570 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5571 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5572 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5573 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12]
5574 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5575 ; BITALG_NOVLX-NEXT: retq
5577 ; BITALG-LABEL: ugt_12_v8i32:
5579 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
5580 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5581 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5582 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5583 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5584 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5585 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5586 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12]
5587 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5589 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
5590 %3 = icmp ugt <8 x i32> %2, <i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12>
5591 %4 = sext <8 x i1> %3 to <8 x i32>
5595 define <8 x i32> @ult_13_v8i32(<8 x i32> %0) {
5596 ; AVX1-LABEL: ult_13_v8i32:
5598 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5599 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
5600 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5601 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
5602 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
5603 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
5604 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
5605 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
5606 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
5607 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
5608 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
5609 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
5610 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
5611 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
5612 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
5613 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
5614 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
5615 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
5616 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
5617 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
5618 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
5619 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
5620 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
5621 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
5622 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
5623 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
5624 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [13,13,13,13]
5625 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
5626 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
5627 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5630 ; AVX2-LABEL: ult_13_v8i32:
5632 ; AVX2-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]
5633 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
5634 ; AVX2-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]
5635 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
5636 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
5637 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
5638 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
5639 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
5640 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
5641 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
5642 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5643 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5644 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5645 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5646 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5647 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13]
5648 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5651 ; AVX512VPOPCNTDQ-LABEL: ult_13_v8i32:
5652 ; AVX512VPOPCNTDQ: # %bb.0:
5653 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5654 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5655 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13]
5656 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5657 ; AVX512VPOPCNTDQ-NEXT: retq
5659 ; AVX512VPOPCNTDQVL-LABEL: ult_13_v8i32:
5660 ; AVX512VPOPCNTDQVL: # %bb.0:
5661 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
5662 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13]
5663 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5664 ; AVX512VPOPCNTDQVL-NEXT: retq
5666 ; BITALG_NOVLX-LABEL: ult_13_v8i32:
5667 ; BITALG_NOVLX: # %bb.0:
5668 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5669 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
5670 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
5671 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5672 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5673 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5674 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5675 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5676 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13]
5677 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5678 ; BITALG_NOVLX-NEXT: retq
5680 ; BITALG-LABEL: ult_13_v8i32:
5682 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
5683 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5684 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5685 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5686 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5687 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5688 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5689 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13]
5690 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5692 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
5693 %3 = icmp ult <8 x i32> %2, <i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13>
5694 %4 = sext <8 x i1> %3 to <8 x i32>
5698 define <8 x i32> @ugt_13_v8i32(<8 x i32> %0) {
5699 ; AVX1-LABEL: ugt_13_v8i32:
5701 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5702 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
5703 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5704 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
5705 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
5706 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
5707 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
5708 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
5709 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
5710 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
5711 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
5712 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
5713 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
5714 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
5715 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
5716 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
5717 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
5718 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
5719 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
5720 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
5721 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
5722 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
5723 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
5724 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
5725 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
5726 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
5727 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [13,13,13,13]
5728 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
5729 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
5730 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5733 ; AVX2-LABEL: ugt_13_v8i32:
5735 ; AVX2-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]
5736 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
5737 ; AVX2-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]
5738 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
5739 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
5740 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
5741 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
5742 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
5743 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
5744 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
5745 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5746 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5747 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5748 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5749 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5750 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13]
5751 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5754 ; AVX512VPOPCNTDQ-LABEL: ugt_13_v8i32:
5755 ; AVX512VPOPCNTDQ: # %bb.0:
5756 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5757 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5758 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13]
5759 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5760 ; AVX512VPOPCNTDQ-NEXT: retq
5762 ; AVX512VPOPCNTDQVL-LABEL: ugt_13_v8i32:
5763 ; AVX512VPOPCNTDQVL: # %bb.0:
5764 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
5765 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13]
5766 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5767 ; AVX512VPOPCNTDQVL-NEXT: retq
5769 ; BITALG_NOVLX-LABEL: ugt_13_v8i32:
5770 ; BITALG_NOVLX: # %bb.0:
5771 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5772 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
5773 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
5774 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5775 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5776 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5777 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5778 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5779 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13]
5780 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5781 ; BITALG_NOVLX-NEXT: retq
5783 ; BITALG-LABEL: ugt_13_v8i32:
5785 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
5786 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5787 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5788 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5789 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5790 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5791 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5792 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13]
5793 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5795 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
5796 %3 = icmp ugt <8 x i32> %2, <i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13>
5797 %4 = sext <8 x i1> %3 to <8 x i32>
5801 define <8 x i32> @ult_14_v8i32(<8 x i32> %0) {
5802 ; AVX1-LABEL: ult_14_v8i32:
5804 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5805 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
5806 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5807 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
5808 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
5809 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
5810 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
5811 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
5812 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
5813 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
5814 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
5815 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
5816 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
5817 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
5818 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
5819 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
5820 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
5821 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
5822 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
5823 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
5824 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
5825 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
5826 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
5827 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
5828 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
5829 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
5830 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [14,14,14,14]
5831 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
5832 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
5833 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5836 ; AVX2-LABEL: ult_14_v8i32:
5838 ; AVX2-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]
5839 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
5840 ; AVX2-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]
5841 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
5842 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
5843 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
5844 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
5845 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
5846 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
5847 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
5848 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5849 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5850 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5851 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5852 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5853 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14]
5854 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5857 ; AVX512VPOPCNTDQ-LABEL: ult_14_v8i32:
5858 ; AVX512VPOPCNTDQ: # %bb.0:
5859 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5860 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5861 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14]
5862 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5863 ; AVX512VPOPCNTDQ-NEXT: retq
5865 ; AVX512VPOPCNTDQVL-LABEL: ult_14_v8i32:
5866 ; AVX512VPOPCNTDQVL: # %bb.0:
5867 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
5868 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14]
5869 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5870 ; AVX512VPOPCNTDQVL-NEXT: retq
5872 ; BITALG_NOVLX-LABEL: ult_14_v8i32:
5873 ; BITALG_NOVLX: # %bb.0:
5874 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5875 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
5876 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
5877 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5878 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5879 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5880 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5881 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5882 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14]
5883 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5884 ; BITALG_NOVLX-NEXT: retq
5886 ; BITALG-LABEL: ult_14_v8i32:
5888 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
5889 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5890 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5891 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5892 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5893 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5894 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5895 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14]
5896 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
5898 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
5899 %3 = icmp ult <8 x i32> %2, <i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14>
5900 %4 = sext <8 x i1> %3 to <8 x i32>
5904 define <8 x i32> @ugt_14_v8i32(<8 x i32> %0) {
5905 ; AVX1-LABEL: ugt_14_v8i32:
5907 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5908 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
5909 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5910 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
5911 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
5912 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
5913 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
5914 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
5915 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
5916 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
5917 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
5918 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
5919 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
5920 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
5921 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
5922 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
5923 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
5924 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
5925 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
5926 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
5927 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
5928 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
5929 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
5930 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
5931 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
5932 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
5933 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [14,14,14,14]
5934 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
5935 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
5936 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
5939 ; AVX2-LABEL: ugt_14_v8i32:
5941 ; AVX2-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]
5942 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
5943 ; AVX2-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]
5944 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
5945 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
5946 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
5947 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
5948 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
5949 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
5950 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
5951 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5952 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5953 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5954 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5955 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5956 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14]
5957 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5960 ; AVX512VPOPCNTDQ-LABEL: ugt_14_v8i32:
5961 ; AVX512VPOPCNTDQ: # %bb.0:
5962 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5963 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5964 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14]
5965 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5966 ; AVX512VPOPCNTDQ-NEXT: retq
5968 ; AVX512VPOPCNTDQVL-LABEL: ugt_14_v8i32:
5969 ; AVX512VPOPCNTDQVL: # %bb.0:
5970 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
5971 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14]
5972 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5973 ; AVX512VPOPCNTDQVL-NEXT: retq
5975 ; BITALG_NOVLX-LABEL: ugt_14_v8i32:
5976 ; BITALG_NOVLX: # %bb.0:
5977 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
5978 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
5979 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
5980 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5981 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5982 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5983 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5984 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5985 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14]
5986 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
5987 ; BITALG_NOVLX-NEXT: retq
5989 ; BITALG-LABEL: ugt_14_v8i32:
5991 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
5992 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5993 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
5994 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
5995 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
5996 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
5997 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5998 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14]
5999 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6001 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
6002 %3 = icmp ugt <8 x i32> %2, <i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14>
6003 %4 = sext <8 x i1> %3 to <8 x i32>
6007 define <8 x i32> @ult_15_v8i32(<8 x i32> %0) {
6008 ; AVX1-LABEL: ult_15_v8i32:
6010 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6011 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
6012 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6013 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
6014 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
6015 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
6016 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
6017 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
6018 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
6019 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
6020 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
6021 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
6022 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
6023 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
6024 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6025 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
6026 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
6027 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
6028 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
6029 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
6030 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
6031 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
6032 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
6033 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6034 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
6035 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
6036 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15]
6037 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
6038 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
6039 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6042 ; AVX2-LABEL: ult_15_v8i32:
6044 ; AVX2-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]
6045 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
6046 ; AVX2-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]
6047 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
6048 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
6049 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
6050 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
6051 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
6052 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
6053 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
6054 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6055 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6056 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6057 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6058 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6059 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15]
6060 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6063 ; AVX512VPOPCNTDQ-LABEL: ult_15_v8i32:
6064 ; AVX512VPOPCNTDQ: # %bb.0:
6065 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6066 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6067 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15]
6068 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6069 ; AVX512VPOPCNTDQ-NEXT: retq
6071 ; AVX512VPOPCNTDQVL-LABEL: ult_15_v8i32:
6072 ; AVX512VPOPCNTDQVL: # %bb.0:
6073 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
6074 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15]
6075 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6076 ; AVX512VPOPCNTDQVL-NEXT: retq
6078 ; BITALG_NOVLX-LABEL: ult_15_v8i32:
6079 ; BITALG_NOVLX: # %bb.0:
6080 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6081 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
6082 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
6083 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6084 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6085 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6086 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6087 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6088 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15]
6089 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6090 ; BITALG_NOVLX-NEXT: retq
6092 ; BITALG-LABEL: ult_15_v8i32:
6094 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
6095 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6096 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6097 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6098 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6099 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6100 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6101 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15]
6102 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6104 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
6105 %3 = icmp ult <8 x i32> %2, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
6106 %4 = sext <8 x i1> %3 to <8 x i32>
6110 define <8 x i32> @ugt_15_v8i32(<8 x i32> %0) {
6111 ; AVX1-LABEL: ugt_15_v8i32:
6113 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6114 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
6115 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6116 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
6117 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
6118 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
6119 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
6120 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
6121 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
6122 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
6123 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
6124 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
6125 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
6126 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
6127 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6128 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
6129 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
6130 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
6131 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
6132 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
6133 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
6134 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
6135 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
6136 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6137 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
6138 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
6139 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15]
6140 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
6141 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
6142 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6145 ; AVX2-LABEL: ugt_15_v8i32:
6147 ; AVX2-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]
6148 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
6149 ; AVX2-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]
6150 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
6151 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
6152 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
6153 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
6154 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
6155 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
6156 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
6157 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6158 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6159 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6160 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6161 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6162 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15]
6163 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6166 ; AVX512VPOPCNTDQ-LABEL: ugt_15_v8i32:
6167 ; AVX512VPOPCNTDQ: # %bb.0:
6168 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6169 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6170 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15]
6171 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6172 ; AVX512VPOPCNTDQ-NEXT: retq
6174 ; AVX512VPOPCNTDQVL-LABEL: ugt_15_v8i32:
6175 ; AVX512VPOPCNTDQVL: # %bb.0:
6176 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
6177 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15]
6178 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6179 ; AVX512VPOPCNTDQVL-NEXT: retq
6181 ; BITALG_NOVLX-LABEL: ugt_15_v8i32:
6182 ; BITALG_NOVLX: # %bb.0:
6183 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6184 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
6185 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
6186 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6187 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6188 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6189 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6190 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6191 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15]
6192 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6193 ; BITALG_NOVLX-NEXT: retq
6195 ; BITALG-LABEL: ugt_15_v8i32:
6197 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
6198 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6199 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6200 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6201 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6202 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6203 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6204 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15]
6205 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6207 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
6208 %3 = icmp ugt <8 x i32> %2, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
6209 %4 = sext <8 x i1> %3 to <8 x i32>
6213 define <8 x i32> @ult_16_v8i32(<8 x i32> %0) {
6214 ; AVX1-LABEL: ult_16_v8i32:
6216 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6217 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
6218 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6219 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
6220 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
6221 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
6222 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
6223 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
6224 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
6225 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
6226 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
6227 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
6228 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
6229 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
6230 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6231 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
6232 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
6233 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
6234 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
6235 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
6236 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
6237 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
6238 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
6239 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6240 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
6241 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
6242 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [16,16,16,16]
6243 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
6244 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
6245 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6248 ; AVX2-LABEL: ult_16_v8i32:
6250 ; AVX2-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]
6251 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
6252 ; AVX2-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]
6253 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
6254 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
6255 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
6256 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
6257 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
6258 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
6259 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
6260 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6261 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6262 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6263 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6264 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6265 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [16,16,16,16,16,16,16,16]
6266 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6269 ; AVX512VPOPCNTDQ-LABEL: ult_16_v8i32:
6270 ; AVX512VPOPCNTDQ: # %bb.0:
6271 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6272 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6273 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [16,16,16,16,16,16,16,16]
6274 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6275 ; AVX512VPOPCNTDQ-NEXT: retq
6277 ; AVX512VPOPCNTDQVL-LABEL: ult_16_v8i32:
6278 ; AVX512VPOPCNTDQVL: # %bb.0:
6279 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
6280 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [16,16,16,16,16,16,16,16]
6281 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6282 ; AVX512VPOPCNTDQVL-NEXT: retq
6284 ; BITALG_NOVLX-LABEL: ult_16_v8i32:
6285 ; BITALG_NOVLX: # %bb.0:
6286 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6287 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
6288 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
6289 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6290 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6291 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6292 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6293 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6294 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [16,16,16,16,16,16,16,16]
6295 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6296 ; BITALG_NOVLX-NEXT: retq
6298 ; BITALG-LABEL: ult_16_v8i32:
6300 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
6301 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6302 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6303 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6304 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6305 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6306 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6307 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [16,16,16,16,16,16,16,16]
6308 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6310 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
6311 %3 = icmp ult <8 x i32> %2, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
6312 %4 = sext <8 x i1> %3 to <8 x i32>
6316 define <8 x i32> @ugt_16_v8i32(<8 x i32> %0) {
6317 ; AVX1-LABEL: ugt_16_v8i32:
6319 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6320 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
6321 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6322 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
6323 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
6324 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
6325 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
6326 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
6327 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
6328 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
6329 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
6330 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
6331 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
6332 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
6333 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6334 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
6335 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
6336 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
6337 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
6338 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
6339 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
6340 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
6341 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
6342 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6343 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
6344 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
6345 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [16,16,16,16]
6346 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
6347 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
6348 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6351 ; AVX2-LABEL: ugt_16_v8i32:
6353 ; AVX2-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]
6354 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
6355 ; AVX2-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]
6356 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
6357 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
6358 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
6359 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
6360 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
6361 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
6362 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
6363 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6364 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6365 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6366 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6367 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6368 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [16,16,16,16,16,16,16,16]
6369 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6372 ; AVX512VPOPCNTDQ-LABEL: ugt_16_v8i32:
6373 ; AVX512VPOPCNTDQ: # %bb.0:
6374 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6375 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6376 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [16,16,16,16,16,16,16,16]
6377 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6378 ; AVX512VPOPCNTDQ-NEXT: retq
6380 ; AVX512VPOPCNTDQVL-LABEL: ugt_16_v8i32:
6381 ; AVX512VPOPCNTDQVL: # %bb.0:
6382 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
6383 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [16,16,16,16,16,16,16,16]
6384 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6385 ; AVX512VPOPCNTDQVL-NEXT: retq
6387 ; BITALG_NOVLX-LABEL: ugt_16_v8i32:
6388 ; BITALG_NOVLX: # %bb.0:
6389 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6390 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
6391 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
6392 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6393 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6394 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6395 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6396 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6397 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [16,16,16,16,16,16,16,16]
6398 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6399 ; BITALG_NOVLX-NEXT: retq
6401 ; BITALG-LABEL: ugt_16_v8i32:
6403 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
6404 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6405 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6406 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6407 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6408 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6409 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6410 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [16,16,16,16,16,16,16,16]
6411 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6413 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
6414 %3 = icmp ugt <8 x i32> %2, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
6415 %4 = sext <8 x i1> %3 to <8 x i32>
6419 define <8 x i32> @ult_17_v8i32(<8 x i32> %0) {
6420 ; AVX1-LABEL: ult_17_v8i32:
6422 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6423 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
6424 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6425 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
6426 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
6427 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
6428 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
6429 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
6430 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
6431 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
6432 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
6433 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
6434 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
6435 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
6436 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6437 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
6438 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
6439 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
6440 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
6441 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
6442 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
6443 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
6444 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
6445 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6446 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
6447 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
6448 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [17,17,17,17]
6449 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
6450 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
6451 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6454 ; AVX2-LABEL: ult_17_v8i32:
6456 ; AVX2-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]
6457 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
6458 ; AVX2-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]
6459 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
6460 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
6461 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
6462 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
6463 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
6464 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
6465 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
6466 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6467 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6468 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6469 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6470 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6471 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [17,17,17,17,17,17,17,17]
6472 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6475 ; AVX512VPOPCNTDQ-LABEL: ult_17_v8i32:
6476 ; AVX512VPOPCNTDQ: # %bb.0:
6477 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6478 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6479 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [17,17,17,17,17,17,17,17]
6480 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6481 ; AVX512VPOPCNTDQ-NEXT: retq
6483 ; AVX512VPOPCNTDQVL-LABEL: ult_17_v8i32:
6484 ; AVX512VPOPCNTDQVL: # %bb.0:
6485 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
6486 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [17,17,17,17,17,17,17,17]
6487 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6488 ; AVX512VPOPCNTDQVL-NEXT: retq
6490 ; BITALG_NOVLX-LABEL: ult_17_v8i32:
6491 ; BITALG_NOVLX: # %bb.0:
6492 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6493 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
6494 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
6495 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6496 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6497 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6498 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6499 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6500 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [17,17,17,17,17,17,17,17]
6501 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6502 ; BITALG_NOVLX-NEXT: retq
6504 ; BITALG-LABEL: ult_17_v8i32:
6506 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
6507 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6508 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6509 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6510 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6511 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6512 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6513 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [17,17,17,17,17,17,17,17]
6514 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6516 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
6517 %3 = icmp ult <8 x i32> %2, <i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17>
6518 %4 = sext <8 x i1> %3 to <8 x i32>
6522 define <8 x i32> @ugt_17_v8i32(<8 x i32> %0) {
6523 ; AVX1-LABEL: ugt_17_v8i32:
6525 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6526 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
6527 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6528 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
6529 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
6530 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
6531 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
6532 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
6533 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
6534 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
6535 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
6536 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
6537 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
6538 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
6539 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6540 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
6541 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
6542 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
6543 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
6544 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
6545 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
6546 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
6547 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
6548 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6549 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
6550 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
6551 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [17,17,17,17]
6552 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
6553 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
6554 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6557 ; AVX2-LABEL: ugt_17_v8i32:
6559 ; AVX2-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]
6560 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
6561 ; AVX2-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]
6562 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
6563 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
6564 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
6565 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
6566 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
6567 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
6568 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
6569 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6570 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6571 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6572 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6573 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6574 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [17,17,17,17,17,17,17,17]
6575 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6578 ; AVX512VPOPCNTDQ-LABEL: ugt_17_v8i32:
6579 ; AVX512VPOPCNTDQ: # %bb.0:
6580 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6581 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6582 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [17,17,17,17,17,17,17,17]
6583 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6584 ; AVX512VPOPCNTDQ-NEXT: retq
6586 ; AVX512VPOPCNTDQVL-LABEL: ugt_17_v8i32:
6587 ; AVX512VPOPCNTDQVL: # %bb.0:
6588 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
6589 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [17,17,17,17,17,17,17,17]
6590 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6591 ; AVX512VPOPCNTDQVL-NEXT: retq
6593 ; BITALG_NOVLX-LABEL: ugt_17_v8i32:
6594 ; BITALG_NOVLX: # %bb.0:
6595 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6596 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
6597 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
6598 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6599 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6600 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6601 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6602 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6603 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [17,17,17,17,17,17,17,17]
6604 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6605 ; BITALG_NOVLX-NEXT: retq
6607 ; BITALG-LABEL: ugt_17_v8i32:
6609 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
6610 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6611 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6612 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6613 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6614 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6615 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6616 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [17,17,17,17,17,17,17,17]
6617 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6619 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
6620 %3 = icmp ugt <8 x i32> %2, <i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17>
6621 %4 = sext <8 x i1> %3 to <8 x i32>
6625 define <8 x i32> @ult_18_v8i32(<8 x i32> %0) {
6626 ; AVX1-LABEL: ult_18_v8i32:
6628 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6629 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
6630 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6631 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
6632 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
6633 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
6634 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
6635 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
6636 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
6637 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
6638 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
6639 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
6640 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
6641 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
6642 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6643 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
6644 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
6645 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
6646 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
6647 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
6648 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
6649 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
6650 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
6651 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6652 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
6653 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
6654 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [18,18,18,18]
6655 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
6656 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
6657 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6660 ; AVX2-LABEL: ult_18_v8i32:
6662 ; AVX2-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]
6663 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
6664 ; AVX2-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]
6665 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
6666 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
6667 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
6668 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
6669 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
6670 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
6671 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
6672 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6673 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6674 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6675 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6676 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6677 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [18,18,18,18,18,18,18,18]
6678 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6681 ; AVX512VPOPCNTDQ-LABEL: ult_18_v8i32:
6682 ; AVX512VPOPCNTDQ: # %bb.0:
6683 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6684 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6685 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [18,18,18,18,18,18,18,18]
6686 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6687 ; AVX512VPOPCNTDQ-NEXT: retq
6689 ; AVX512VPOPCNTDQVL-LABEL: ult_18_v8i32:
6690 ; AVX512VPOPCNTDQVL: # %bb.0:
6691 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
6692 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [18,18,18,18,18,18,18,18]
6693 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6694 ; AVX512VPOPCNTDQVL-NEXT: retq
6696 ; BITALG_NOVLX-LABEL: ult_18_v8i32:
6697 ; BITALG_NOVLX: # %bb.0:
6698 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6699 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
6700 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
6701 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6702 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6703 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6704 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6705 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6706 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [18,18,18,18,18,18,18,18]
6707 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6708 ; BITALG_NOVLX-NEXT: retq
6710 ; BITALG-LABEL: ult_18_v8i32:
6712 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
6713 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6714 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6715 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6716 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6717 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6718 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6719 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [18,18,18,18,18,18,18,18]
6720 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6722 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
6723 %3 = icmp ult <8 x i32> %2, <i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18>
6724 %4 = sext <8 x i1> %3 to <8 x i32>
6728 define <8 x i32> @ugt_18_v8i32(<8 x i32> %0) {
6729 ; AVX1-LABEL: ugt_18_v8i32:
6731 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6732 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
6733 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6734 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
6735 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
6736 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
6737 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
6738 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
6739 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
6740 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
6741 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
6742 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
6743 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
6744 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
6745 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6746 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
6747 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
6748 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
6749 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
6750 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
6751 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
6752 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
6753 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
6754 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6755 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
6756 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
6757 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [18,18,18,18]
6758 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
6759 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
6760 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6763 ; AVX2-LABEL: ugt_18_v8i32:
6765 ; AVX2-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]
6766 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
6767 ; AVX2-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]
6768 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
6769 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
6770 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
6771 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
6772 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
6773 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
6774 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
6775 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6776 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6777 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6778 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6779 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6780 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [18,18,18,18,18,18,18,18]
6781 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6784 ; AVX512VPOPCNTDQ-LABEL: ugt_18_v8i32:
6785 ; AVX512VPOPCNTDQ: # %bb.0:
6786 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6787 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6788 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [18,18,18,18,18,18,18,18]
6789 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6790 ; AVX512VPOPCNTDQ-NEXT: retq
6792 ; AVX512VPOPCNTDQVL-LABEL: ugt_18_v8i32:
6793 ; AVX512VPOPCNTDQVL: # %bb.0:
6794 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
6795 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [18,18,18,18,18,18,18,18]
6796 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6797 ; AVX512VPOPCNTDQVL-NEXT: retq
6799 ; BITALG_NOVLX-LABEL: ugt_18_v8i32:
6800 ; BITALG_NOVLX: # %bb.0:
6801 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6802 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
6803 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
6804 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6805 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6806 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6807 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6808 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6809 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [18,18,18,18,18,18,18,18]
6810 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6811 ; BITALG_NOVLX-NEXT: retq
6813 ; BITALG-LABEL: ugt_18_v8i32:
6815 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
6816 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6817 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6818 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6819 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6820 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6821 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6822 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [18,18,18,18,18,18,18,18]
6823 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6825 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
6826 %3 = icmp ugt <8 x i32> %2, <i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18>
6827 %4 = sext <8 x i1> %3 to <8 x i32>
6831 define <8 x i32> @ult_19_v8i32(<8 x i32> %0) {
6832 ; AVX1-LABEL: ult_19_v8i32:
6834 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6835 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
6836 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6837 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
6838 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
6839 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
6840 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
6841 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
6842 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
6843 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
6844 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
6845 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
6846 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
6847 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
6848 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6849 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
6850 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
6851 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
6852 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
6853 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
6854 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
6855 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
6856 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
6857 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6858 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
6859 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
6860 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [19,19,19,19]
6861 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
6862 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
6863 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6866 ; AVX2-LABEL: ult_19_v8i32:
6868 ; AVX2-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]
6869 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
6870 ; AVX2-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]
6871 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
6872 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
6873 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
6874 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
6875 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
6876 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
6877 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
6878 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6879 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6880 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6881 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6882 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6883 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [19,19,19,19,19,19,19,19]
6884 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6887 ; AVX512VPOPCNTDQ-LABEL: ult_19_v8i32:
6888 ; AVX512VPOPCNTDQ: # %bb.0:
6889 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6890 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6891 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [19,19,19,19,19,19,19,19]
6892 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6893 ; AVX512VPOPCNTDQ-NEXT: retq
6895 ; AVX512VPOPCNTDQVL-LABEL: ult_19_v8i32:
6896 ; AVX512VPOPCNTDQVL: # %bb.0:
6897 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
6898 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [19,19,19,19,19,19,19,19]
6899 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6900 ; AVX512VPOPCNTDQVL-NEXT: retq
6902 ; BITALG_NOVLX-LABEL: ult_19_v8i32:
6903 ; BITALG_NOVLX: # %bb.0:
6904 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6905 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
6906 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
6907 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6908 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6909 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6910 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6911 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6912 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [19,19,19,19,19,19,19,19]
6913 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6914 ; BITALG_NOVLX-NEXT: retq
6916 ; BITALG-LABEL: ult_19_v8i32:
6918 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
6919 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6920 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6921 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6922 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6923 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6924 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6925 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [19,19,19,19,19,19,19,19]
6926 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
6928 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
6929 %3 = icmp ult <8 x i32> %2, <i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19>
6930 %4 = sext <8 x i1> %3 to <8 x i32>
6934 define <8 x i32> @ugt_19_v8i32(<8 x i32> %0) {
6935 ; AVX1-LABEL: ugt_19_v8i32:
6937 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6938 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
6939 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6940 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
6941 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
6942 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
6943 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
6944 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
6945 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
6946 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
6947 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
6948 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
6949 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
6950 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
6951 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
6952 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
6953 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
6954 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
6955 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
6956 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
6957 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
6958 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
6959 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
6960 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
6961 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
6962 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
6963 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [19,19,19,19]
6964 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
6965 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
6966 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
6969 ; AVX2-LABEL: ugt_19_v8i32:
6971 ; AVX2-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]
6972 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
6973 ; AVX2-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]
6974 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
6975 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
6976 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
6977 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
6978 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
6979 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
6980 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
6981 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
6982 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
6983 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
6984 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
6985 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6986 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [19,19,19,19,19,19,19,19]
6987 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6990 ; AVX512VPOPCNTDQ-LABEL: ugt_19_v8i32:
6991 ; AVX512VPOPCNTDQ: # %bb.0:
6992 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
6993 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6994 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [19,19,19,19,19,19,19,19]
6995 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
6996 ; AVX512VPOPCNTDQ-NEXT: retq
6998 ; AVX512VPOPCNTDQVL-LABEL: ugt_19_v8i32:
6999 ; AVX512VPOPCNTDQVL: # %bb.0:
7000 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
7001 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [19,19,19,19,19,19,19,19]
7002 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7003 ; AVX512VPOPCNTDQVL-NEXT: retq
7005 ; BITALG_NOVLX-LABEL: ugt_19_v8i32:
7006 ; BITALG_NOVLX: # %bb.0:
7007 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7008 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
7009 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
7010 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7011 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7012 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7013 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7014 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7015 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [19,19,19,19,19,19,19,19]
7016 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7017 ; BITALG_NOVLX-NEXT: retq
7019 ; BITALG-LABEL: ugt_19_v8i32:
7021 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
7022 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7023 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7024 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7025 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7026 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7027 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7028 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [19,19,19,19,19,19,19,19]
7029 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7031 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
7032 %3 = icmp ugt <8 x i32> %2, <i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19>
7033 %4 = sext <8 x i1> %3 to <8 x i32>
7037 define <8 x i32> @ult_20_v8i32(<8 x i32> %0) {
7038 ; AVX1-LABEL: ult_20_v8i32:
7040 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7041 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
7042 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7043 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
7044 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
7045 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
7046 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
7047 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
7048 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
7049 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
7050 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
7051 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
7052 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
7053 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
7054 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7055 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
7056 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
7057 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
7058 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
7059 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
7060 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
7061 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
7062 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
7063 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7064 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
7065 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
7066 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [20,20,20,20]
7067 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
7068 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
7069 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7072 ; AVX2-LABEL: ult_20_v8i32:
7074 ; AVX2-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]
7075 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
7076 ; AVX2-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]
7077 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
7078 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
7079 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
7080 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
7081 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
7082 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
7083 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
7084 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7085 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7086 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7087 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7088 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7089 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [20,20,20,20,20,20,20,20]
7090 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7093 ; AVX512VPOPCNTDQ-LABEL: ult_20_v8i32:
7094 ; AVX512VPOPCNTDQ: # %bb.0:
7095 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7096 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7097 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [20,20,20,20,20,20,20,20]
7098 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7099 ; AVX512VPOPCNTDQ-NEXT: retq
7101 ; AVX512VPOPCNTDQVL-LABEL: ult_20_v8i32:
7102 ; AVX512VPOPCNTDQVL: # %bb.0:
7103 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
7104 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [20,20,20,20,20,20,20,20]
7105 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7106 ; AVX512VPOPCNTDQVL-NEXT: retq
7108 ; BITALG_NOVLX-LABEL: ult_20_v8i32:
7109 ; BITALG_NOVLX: # %bb.0:
7110 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7111 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
7112 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
7113 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7114 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7115 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7116 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7117 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7118 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [20,20,20,20,20,20,20,20]
7119 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7120 ; BITALG_NOVLX-NEXT: retq
7122 ; BITALG-LABEL: ult_20_v8i32:
7124 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
7125 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7126 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7127 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7128 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7129 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7130 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7131 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [20,20,20,20,20,20,20,20]
7132 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7134 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
7135 %3 = icmp ult <8 x i32> %2, <i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20>
7136 %4 = sext <8 x i1> %3 to <8 x i32>
7140 define <8 x i32> @ugt_20_v8i32(<8 x i32> %0) {
7141 ; AVX1-LABEL: ugt_20_v8i32:
7143 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7144 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
7145 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7146 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
7147 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
7148 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
7149 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
7150 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
7151 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
7152 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
7153 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
7154 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
7155 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
7156 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
7157 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7158 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
7159 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
7160 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
7161 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
7162 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
7163 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
7164 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
7165 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
7166 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7167 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
7168 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
7169 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [20,20,20,20]
7170 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
7171 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
7172 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7175 ; AVX2-LABEL: ugt_20_v8i32:
7177 ; AVX2-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]
7178 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
7179 ; AVX2-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]
7180 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
7181 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
7182 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
7183 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
7184 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
7185 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
7186 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
7187 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7188 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7189 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7190 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7191 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7192 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [20,20,20,20,20,20,20,20]
7193 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7196 ; AVX512VPOPCNTDQ-LABEL: ugt_20_v8i32:
7197 ; AVX512VPOPCNTDQ: # %bb.0:
7198 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7199 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7200 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [20,20,20,20,20,20,20,20]
7201 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7202 ; AVX512VPOPCNTDQ-NEXT: retq
7204 ; AVX512VPOPCNTDQVL-LABEL: ugt_20_v8i32:
7205 ; AVX512VPOPCNTDQVL: # %bb.0:
7206 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
7207 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [20,20,20,20,20,20,20,20]
7208 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7209 ; AVX512VPOPCNTDQVL-NEXT: retq
7211 ; BITALG_NOVLX-LABEL: ugt_20_v8i32:
7212 ; BITALG_NOVLX: # %bb.0:
7213 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7214 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
7215 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
7216 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7217 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7218 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7219 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7220 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7221 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [20,20,20,20,20,20,20,20]
7222 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7223 ; BITALG_NOVLX-NEXT: retq
7225 ; BITALG-LABEL: ugt_20_v8i32:
7227 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
7228 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7229 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7230 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7231 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7232 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7233 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7234 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [20,20,20,20,20,20,20,20]
7235 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7237 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
7238 %3 = icmp ugt <8 x i32> %2, <i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20>
7239 %4 = sext <8 x i1> %3 to <8 x i32>
7243 define <8 x i32> @ult_21_v8i32(<8 x i32> %0) {
7244 ; AVX1-LABEL: ult_21_v8i32:
7246 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7247 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
7248 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7249 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
7250 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
7251 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
7252 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
7253 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
7254 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
7255 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
7256 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
7257 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
7258 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
7259 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
7260 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7261 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
7262 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
7263 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
7264 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
7265 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
7266 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
7267 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
7268 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
7269 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7270 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
7271 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
7272 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [21,21,21,21]
7273 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
7274 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
7275 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7278 ; AVX2-LABEL: ult_21_v8i32:
7280 ; AVX2-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]
7281 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
7282 ; AVX2-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]
7283 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
7284 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
7285 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
7286 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
7287 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
7288 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
7289 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
7290 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7291 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7292 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7293 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7294 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7295 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [21,21,21,21,21,21,21,21]
7296 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7299 ; AVX512VPOPCNTDQ-LABEL: ult_21_v8i32:
7300 ; AVX512VPOPCNTDQ: # %bb.0:
7301 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7302 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7303 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [21,21,21,21,21,21,21,21]
7304 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7305 ; AVX512VPOPCNTDQ-NEXT: retq
7307 ; AVX512VPOPCNTDQVL-LABEL: ult_21_v8i32:
7308 ; AVX512VPOPCNTDQVL: # %bb.0:
7309 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
7310 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [21,21,21,21,21,21,21,21]
7311 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7312 ; AVX512VPOPCNTDQVL-NEXT: retq
7314 ; BITALG_NOVLX-LABEL: ult_21_v8i32:
7315 ; BITALG_NOVLX: # %bb.0:
7316 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7317 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
7318 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
7319 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7320 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7321 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7322 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7323 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7324 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [21,21,21,21,21,21,21,21]
7325 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7326 ; BITALG_NOVLX-NEXT: retq
7328 ; BITALG-LABEL: ult_21_v8i32:
7330 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
7331 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7332 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7333 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7334 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7335 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7336 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7337 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [21,21,21,21,21,21,21,21]
7338 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7340 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
7341 %3 = icmp ult <8 x i32> %2, <i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21>
7342 %4 = sext <8 x i1> %3 to <8 x i32>
7346 define <8 x i32> @ugt_21_v8i32(<8 x i32> %0) {
7347 ; AVX1-LABEL: ugt_21_v8i32:
7349 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7350 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
7351 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7352 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
7353 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
7354 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
7355 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
7356 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
7357 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
7358 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
7359 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
7360 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
7361 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
7362 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
7363 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7364 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
7365 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
7366 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
7367 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
7368 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
7369 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
7370 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
7371 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
7372 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7373 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
7374 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
7375 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [21,21,21,21]
7376 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
7377 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
7378 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7381 ; AVX2-LABEL: ugt_21_v8i32:
7383 ; AVX2-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]
7384 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
7385 ; AVX2-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]
7386 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
7387 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
7388 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
7389 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
7390 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
7391 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
7392 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
7393 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7394 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7395 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7396 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7397 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7398 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [21,21,21,21,21,21,21,21]
7399 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7402 ; AVX512VPOPCNTDQ-LABEL: ugt_21_v8i32:
7403 ; AVX512VPOPCNTDQ: # %bb.0:
7404 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7405 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7406 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [21,21,21,21,21,21,21,21]
7407 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7408 ; AVX512VPOPCNTDQ-NEXT: retq
7410 ; AVX512VPOPCNTDQVL-LABEL: ugt_21_v8i32:
7411 ; AVX512VPOPCNTDQVL: # %bb.0:
7412 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
7413 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [21,21,21,21,21,21,21,21]
7414 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7415 ; AVX512VPOPCNTDQVL-NEXT: retq
7417 ; BITALG_NOVLX-LABEL: ugt_21_v8i32:
7418 ; BITALG_NOVLX: # %bb.0:
7419 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7420 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
7421 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
7422 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7423 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7424 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7425 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7426 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7427 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [21,21,21,21,21,21,21,21]
7428 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7429 ; BITALG_NOVLX-NEXT: retq
7431 ; BITALG-LABEL: ugt_21_v8i32:
7433 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
7434 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7435 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7436 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7437 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7438 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7439 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7440 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [21,21,21,21,21,21,21,21]
7441 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7443 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
7444 %3 = icmp ugt <8 x i32> %2, <i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21>
7445 %4 = sext <8 x i1> %3 to <8 x i32>
7449 define <8 x i32> @ult_22_v8i32(<8 x i32> %0) {
7450 ; AVX1-LABEL: ult_22_v8i32:
7452 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7453 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
7454 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7455 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
7456 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
7457 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
7458 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
7459 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
7460 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
7461 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
7462 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
7463 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
7464 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
7465 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
7466 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7467 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
7468 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
7469 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
7470 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
7471 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
7472 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
7473 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
7474 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
7475 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7476 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
7477 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
7478 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [22,22,22,22]
7479 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
7480 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
7481 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7484 ; AVX2-LABEL: ult_22_v8i32:
7486 ; AVX2-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]
7487 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
7488 ; AVX2-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]
7489 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
7490 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
7491 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
7492 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
7493 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
7494 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
7495 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
7496 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7497 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7498 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7499 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7500 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7501 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [22,22,22,22,22,22,22,22]
7502 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7505 ; AVX512VPOPCNTDQ-LABEL: ult_22_v8i32:
7506 ; AVX512VPOPCNTDQ: # %bb.0:
7507 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7508 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7509 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [22,22,22,22,22,22,22,22]
7510 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7511 ; AVX512VPOPCNTDQ-NEXT: retq
7513 ; AVX512VPOPCNTDQVL-LABEL: ult_22_v8i32:
7514 ; AVX512VPOPCNTDQVL: # %bb.0:
7515 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
7516 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [22,22,22,22,22,22,22,22]
7517 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7518 ; AVX512VPOPCNTDQVL-NEXT: retq
7520 ; BITALG_NOVLX-LABEL: ult_22_v8i32:
7521 ; BITALG_NOVLX: # %bb.0:
7522 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7523 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
7524 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
7525 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7526 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7527 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7528 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7529 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7530 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [22,22,22,22,22,22,22,22]
7531 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7532 ; BITALG_NOVLX-NEXT: retq
7534 ; BITALG-LABEL: ult_22_v8i32:
7536 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
7537 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7538 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7539 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7540 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7541 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7542 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7543 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [22,22,22,22,22,22,22,22]
7544 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7546 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
7547 %3 = icmp ult <8 x i32> %2, <i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22>
7548 %4 = sext <8 x i1> %3 to <8 x i32>
7552 define <8 x i32> @ugt_22_v8i32(<8 x i32> %0) {
7553 ; AVX1-LABEL: ugt_22_v8i32:
7555 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7556 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
7557 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7558 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
7559 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
7560 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
7561 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
7562 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
7563 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
7564 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
7565 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
7566 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
7567 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
7568 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
7569 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7570 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
7571 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
7572 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
7573 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
7574 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
7575 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
7576 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
7577 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
7578 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7579 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
7580 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
7581 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [22,22,22,22]
7582 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
7583 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
7584 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7587 ; AVX2-LABEL: ugt_22_v8i32:
7589 ; AVX2-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]
7590 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
7591 ; AVX2-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]
7592 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
7593 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
7594 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
7595 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
7596 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
7597 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
7598 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
7599 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7600 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7601 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7602 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7603 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7604 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [22,22,22,22,22,22,22,22]
7605 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7608 ; AVX512VPOPCNTDQ-LABEL: ugt_22_v8i32:
7609 ; AVX512VPOPCNTDQ: # %bb.0:
7610 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7611 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7612 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [22,22,22,22,22,22,22,22]
7613 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7614 ; AVX512VPOPCNTDQ-NEXT: retq
7616 ; AVX512VPOPCNTDQVL-LABEL: ugt_22_v8i32:
7617 ; AVX512VPOPCNTDQVL: # %bb.0:
7618 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
7619 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [22,22,22,22,22,22,22,22]
7620 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7621 ; AVX512VPOPCNTDQVL-NEXT: retq
7623 ; BITALG_NOVLX-LABEL: ugt_22_v8i32:
7624 ; BITALG_NOVLX: # %bb.0:
7625 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7626 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
7627 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
7628 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7629 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7630 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7631 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7632 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7633 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [22,22,22,22,22,22,22,22]
7634 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7635 ; BITALG_NOVLX-NEXT: retq
7637 ; BITALG-LABEL: ugt_22_v8i32:
7639 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
7640 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7641 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7642 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7643 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7644 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7645 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7646 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [22,22,22,22,22,22,22,22]
7647 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7649 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
7650 %3 = icmp ugt <8 x i32> %2, <i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22>
7651 %4 = sext <8 x i1> %3 to <8 x i32>
7655 define <8 x i32> @ult_23_v8i32(<8 x i32> %0) {
7656 ; AVX1-LABEL: ult_23_v8i32:
7658 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7659 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
7660 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7661 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
7662 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
7663 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
7664 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
7665 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
7666 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
7667 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
7668 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
7669 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
7670 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
7671 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
7672 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7673 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
7674 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
7675 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
7676 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
7677 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
7678 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
7679 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
7680 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
7681 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7682 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
7683 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
7684 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [23,23,23,23]
7685 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
7686 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
7687 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7690 ; AVX2-LABEL: ult_23_v8i32:
7692 ; AVX2-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]
7693 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
7694 ; AVX2-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]
7695 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
7696 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
7697 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
7698 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
7699 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
7700 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
7701 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
7702 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7703 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7704 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7705 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7706 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7707 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [23,23,23,23,23,23,23,23]
7708 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7711 ; AVX512VPOPCNTDQ-LABEL: ult_23_v8i32:
7712 ; AVX512VPOPCNTDQ: # %bb.0:
7713 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7714 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7715 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [23,23,23,23,23,23,23,23]
7716 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7717 ; AVX512VPOPCNTDQ-NEXT: retq
7719 ; AVX512VPOPCNTDQVL-LABEL: ult_23_v8i32:
7720 ; AVX512VPOPCNTDQVL: # %bb.0:
7721 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
7722 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [23,23,23,23,23,23,23,23]
7723 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7724 ; AVX512VPOPCNTDQVL-NEXT: retq
7726 ; BITALG_NOVLX-LABEL: ult_23_v8i32:
7727 ; BITALG_NOVLX: # %bb.0:
7728 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7729 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
7730 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
7731 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7732 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7733 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7734 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7735 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7736 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [23,23,23,23,23,23,23,23]
7737 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7738 ; BITALG_NOVLX-NEXT: retq
7740 ; BITALG-LABEL: ult_23_v8i32:
7742 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
7743 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7744 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7745 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7746 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7747 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7748 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7749 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [23,23,23,23,23,23,23,23]
7750 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7752 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
7753 %3 = icmp ult <8 x i32> %2, <i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23>
7754 %4 = sext <8 x i1> %3 to <8 x i32>
7758 define <8 x i32> @ugt_23_v8i32(<8 x i32> %0) {
7759 ; AVX1-LABEL: ugt_23_v8i32:
7761 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7762 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
7763 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7764 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
7765 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
7766 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
7767 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
7768 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
7769 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
7770 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
7771 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
7772 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
7773 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
7774 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
7775 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7776 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
7777 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
7778 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
7779 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
7780 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
7781 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
7782 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
7783 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
7784 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7785 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
7786 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
7787 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [23,23,23,23]
7788 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
7789 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
7790 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7793 ; AVX2-LABEL: ugt_23_v8i32:
7795 ; AVX2-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]
7796 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
7797 ; AVX2-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]
7798 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
7799 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
7800 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
7801 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
7802 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
7803 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
7804 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
7805 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7806 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7807 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7808 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7809 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7810 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [23,23,23,23,23,23,23,23]
7811 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7814 ; AVX512VPOPCNTDQ-LABEL: ugt_23_v8i32:
7815 ; AVX512VPOPCNTDQ: # %bb.0:
7816 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7817 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7818 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [23,23,23,23,23,23,23,23]
7819 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7820 ; AVX512VPOPCNTDQ-NEXT: retq
7822 ; AVX512VPOPCNTDQVL-LABEL: ugt_23_v8i32:
7823 ; AVX512VPOPCNTDQVL: # %bb.0:
7824 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
7825 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [23,23,23,23,23,23,23,23]
7826 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7827 ; AVX512VPOPCNTDQVL-NEXT: retq
7829 ; BITALG_NOVLX-LABEL: ugt_23_v8i32:
7830 ; BITALG_NOVLX: # %bb.0:
7831 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7832 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
7833 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
7834 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7835 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7836 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7837 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7838 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7839 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [23,23,23,23,23,23,23,23]
7840 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7841 ; BITALG_NOVLX-NEXT: retq
7843 ; BITALG-LABEL: ugt_23_v8i32:
7845 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
7846 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7847 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7848 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7849 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7850 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7851 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7852 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [23,23,23,23,23,23,23,23]
7853 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
7855 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
7856 %3 = icmp ugt <8 x i32> %2, <i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23>
7857 %4 = sext <8 x i1> %3 to <8 x i32>
7861 define <8 x i32> @ult_24_v8i32(<8 x i32> %0) {
7862 ; AVX1-LABEL: ult_24_v8i32:
7864 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7865 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
7866 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7867 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
7868 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
7869 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
7870 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
7871 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
7872 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
7873 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
7874 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
7875 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
7876 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
7877 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
7878 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7879 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
7880 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
7881 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
7882 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
7883 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
7884 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
7885 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
7886 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
7887 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7888 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
7889 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
7890 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [24,24,24,24]
7891 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
7892 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
7893 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7896 ; AVX2-LABEL: ult_24_v8i32:
7898 ; AVX2-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]
7899 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
7900 ; AVX2-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]
7901 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
7902 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
7903 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
7904 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
7905 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
7906 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
7907 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
7908 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7909 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7910 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7911 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7912 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7913 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [24,24,24,24,24,24,24,24]
7914 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7917 ; AVX512VPOPCNTDQ-LABEL: ult_24_v8i32:
7918 ; AVX512VPOPCNTDQ: # %bb.0:
7919 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7920 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7921 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [24,24,24,24,24,24,24,24]
7922 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7923 ; AVX512VPOPCNTDQ-NEXT: retq
7925 ; AVX512VPOPCNTDQVL-LABEL: ult_24_v8i32:
7926 ; AVX512VPOPCNTDQVL: # %bb.0:
7927 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
7928 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [24,24,24,24,24,24,24,24]
7929 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7930 ; AVX512VPOPCNTDQVL-NEXT: retq
7932 ; BITALG_NOVLX-LABEL: ult_24_v8i32:
7933 ; BITALG_NOVLX: # %bb.0:
7934 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
7935 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
7936 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
7937 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7938 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7939 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7940 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7941 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7942 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [24,24,24,24,24,24,24,24]
7943 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7944 ; BITALG_NOVLX-NEXT: retq
7946 ; BITALG-LABEL: ult_24_v8i32:
7948 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
7949 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7950 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
7951 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
7952 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
7953 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
7954 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7955 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [24,24,24,24,24,24,24,24]
7956 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
7958 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
7959 %3 = icmp ult <8 x i32> %2, <i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24>
7960 %4 = sext <8 x i1> %3 to <8 x i32>
7964 define <8 x i32> @ugt_24_v8i32(<8 x i32> %0) {
7965 ; AVX1-LABEL: ugt_24_v8i32:
7967 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7968 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
7969 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7970 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
7971 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
7972 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
7973 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
7974 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
7975 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
7976 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
7977 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
7978 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
7979 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
7980 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
7981 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
7982 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
7983 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
7984 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
7985 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
7986 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
7987 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
7988 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
7989 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
7990 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
7991 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
7992 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
7993 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [24,24,24,24]
7994 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
7995 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
7996 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
7999 ; AVX2-LABEL: ugt_24_v8i32:
8001 ; AVX2-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]
8002 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
8003 ; AVX2-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]
8004 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
8005 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
8006 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
8007 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
8008 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
8009 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
8010 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
8011 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8012 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8013 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8014 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8015 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8016 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [24,24,24,24,24,24,24,24]
8017 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8020 ; AVX512VPOPCNTDQ-LABEL: ugt_24_v8i32:
8021 ; AVX512VPOPCNTDQ: # %bb.0:
8022 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8023 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8024 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [24,24,24,24,24,24,24,24]
8025 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8026 ; AVX512VPOPCNTDQ-NEXT: retq
8028 ; AVX512VPOPCNTDQVL-LABEL: ugt_24_v8i32:
8029 ; AVX512VPOPCNTDQVL: # %bb.0:
8030 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
8031 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [24,24,24,24,24,24,24,24]
8032 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8033 ; AVX512VPOPCNTDQVL-NEXT: retq
8035 ; BITALG_NOVLX-LABEL: ugt_24_v8i32:
8036 ; BITALG_NOVLX: # %bb.0:
8037 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8038 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
8039 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
8040 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8041 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8042 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8043 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8044 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8045 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [24,24,24,24,24,24,24,24]
8046 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8047 ; BITALG_NOVLX-NEXT: retq
8049 ; BITALG-LABEL: ugt_24_v8i32:
8051 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
8052 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8053 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8054 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8055 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8056 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8057 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8058 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [24,24,24,24,24,24,24,24]
8059 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8061 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
8062 %3 = icmp ugt <8 x i32> %2, <i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24>
8063 %4 = sext <8 x i1> %3 to <8 x i32>
8067 define <8 x i32> @ult_25_v8i32(<8 x i32> %0) {
8068 ; AVX1-LABEL: ult_25_v8i32:
8070 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8071 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
8072 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8073 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
8074 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
8075 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
8076 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
8077 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
8078 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
8079 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
8080 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
8081 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
8082 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
8083 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
8084 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
8085 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
8086 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
8087 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
8088 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
8089 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
8090 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
8091 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
8092 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
8093 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
8094 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
8095 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
8096 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [25,25,25,25]
8097 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
8098 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
8099 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
8102 ; AVX2-LABEL: ult_25_v8i32:
8104 ; AVX2-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]
8105 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
8106 ; AVX2-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]
8107 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
8108 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
8109 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
8110 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
8111 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
8112 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
8113 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
8114 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8115 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8116 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8117 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8118 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8119 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [25,25,25,25,25,25,25,25]
8120 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8123 ; AVX512VPOPCNTDQ-LABEL: ult_25_v8i32:
8124 ; AVX512VPOPCNTDQ: # %bb.0:
8125 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8126 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8127 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [25,25,25,25,25,25,25,25]
8128 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8129 ; AVX512VPOPCNTDQ-NEXT: retq
8131 ; AVX512VPOPCNTDQVL-LABEL: ult_25_v8i32:
8132 ; AVX512VPOPCNTDQVL: # %bb.0:
8133 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
8134 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [25,25,25,25,25,25,25,25]
8135 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8136 ; AVX512VPOPCNTDQVL-NEXT: retq
8138 ; BITALG_NOVLX-LABEL: ult_25_v8i32:
8139 ; BITALG_NOVLX: # %bb.0:
8140 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8141 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
8142 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
8143 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8144 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8145 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8146 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8147 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8148 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [25,25,25,25,25,25,25,25]
8149 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8150 ; BITALG_NOVLX-NEXT: retq
8152 ; BITALG-LABEL: ult_25_v8i32:
8154 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
8155 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8156 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8157 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8158 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8159 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8160 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8161 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [25,25,25,25,25,25,25,25]
8162 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8164 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
8165 %3 = icmp ult <8 x i32> %2, <i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25>
8166 %4 = sext <8 x i1> %3 to <8 x i32>
8170 define <8 x i32> @ugt_25_v8i32(<8 x i32> %0) {
8171 ; AVX1-LABEL: ugt_25_v8i32:
8173 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8174 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
8175 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8176 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
8177 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
8178 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
8179 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
8180 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
8181 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
8182 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
8183 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
8184 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
8185 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
8186 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
8187 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
8188 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
8189 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
8190 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
8191 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
8192 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
8193 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
8194 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
8195 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
8196 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
8197 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
8198 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
8199 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [25,25,25,25]
8200 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
8201 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
8202 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
8205 ; AVX2-LABEL: ugt_25_v8i32:
8207 ; AVX2-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]
8208 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
8209 ; AVX2-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]
8210 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
8211 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
8212 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
8213 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
8214 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
8215 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
8216 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
8217 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8218 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8219 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8220 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8221 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8222 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [25,25,25,25,25,25,25,25]
8223 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8226 ; AVX512VPOPCNTDQ-LABEL: ugt_25_v8i32:
8227 ; AVX512VPOPCNTDQ: # %bb.0:
8228 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8229 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8230 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [25,25,25,25,25,25,25,25]
8231 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8232 ; AVX512VPOPCNTDQ-NEXT: retq
8234 ; AVX512VPOPCNTDQVL-LABEL: ugt_25_v8i32:
8235 ; AVX512VPOPCNTDQVL: # %bb.0:
8236 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
8237 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [25,25,25,25,25,25,25,25]
8238 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8239 ; AVX512VPOPCNTDQVL-NEXT: retq
8241 ; BITALG_NOVLX-LABEL: ugt_25_v8i32:
8242 ; BITALG_NOVLX: # %bb.0:
8243 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8244 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
8245 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
8246 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8247 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8248 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8249 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8250 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8251 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [25,25,25,25,25,25,25,25]
8252 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8253 ; BITALG_NOVLX-NEXT: retq
8255 ; BITALG-LABEL: ugt_25_v8i32:
8257 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
8258 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8259 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8260 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8261 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8262 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8263 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8264 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [25,25,25,25,25,25,25,25]
8265 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8267 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
8268 %3 = icmp ugt <8 x i32> %2, <i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25>
8269 %4 = sext <8 x i1> %3 to <8 x i32>
8273 define <8 x i32> @ult_26_v8i32(<8 x i32> %0) {
8274 ; AVX1-LABEL: ult_26_v8i32:
8276 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8277 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
8278 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8279 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
8280 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
8281 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
8282 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
8283 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
8284 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
8285 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
8286 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
8287 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
8288 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
8289 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
8290 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
8291 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
8292 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
8293 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
8294 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
8295 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
8296 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
8297 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
8298 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
8299 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
8300 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
8301 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
8302 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [26,26,26,26]
8303 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
8304 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
8305 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
8308 ; AVX2-LABEL: ult_26_v8i32:
8310 ; AVX2-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]
8311 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
8312 ; AVX2-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]
8313 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
8314 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
8315 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
8316 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
8317 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
8318 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
8319 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
8320 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8321 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8322 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8323 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8324 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8325 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [26,26,26,26,26,26,26,26]
8326 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8329 ; AVX512VPOPCNTDQ-LABEL: ult_26_v8i32:
8330 ; AVX512VPOPCNTDQ: # %bb.0:
8331 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8332 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8333 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [26,26,26,26,26,26,26,26]
8334 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8335 ; AVX512VPOPCNTDQ-NEXT: retq
8337 ; AVX512VPOPCNTDQVL-LABEL: ult_26_v8i32:
8338 ; AVX512VPOPCNTDQVL: # %bb.0:
8339 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
8340 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [26,26,26,26,26,26,26,26]
8341 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8342 ; AVX512VPOPCNTDQVL-NEXT: retq
8344 ; BITALG_NOVLX-LABEL: ult_26_v8i32:
8345 ; BITALG_NOVLX: # %bb.0:
8346 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8347 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
8348 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
8349 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8350 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8351 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8352 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8353 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8354 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [26,26,26,26,26,26,26,26]
8355 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8356 ; BITALG_NOVLX-NEXT: retq
8358 ; BITALG-LABEL: ult_26_v8i32:
8360 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
8361 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8362 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8363 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8364 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8365 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8366 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8367 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [26,26,26,26,26,26,26,26]
8368 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8370 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
8371 %3 = icmp ult <8 x i32> %2, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
8372 %4 = sext <8 x i1> %3 to <8 x i32>
8376 define <8 x i32> @ugt_26_v8i32(<8 x i32> %0) {
8377 ; AVX1-LABEL: ugt_26_v8i32:
8379 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8380 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
8381 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8382 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
8383 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
8384 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
8385 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
8386 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
8387 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
8388 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
8389 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
8390 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
8391 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
8392 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
8393 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
8394 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
8395 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
8396 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
8397 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
8398 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
8399 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
8400 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
8401 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
8402 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
8403 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
8404 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
8405 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [26,26,26,26]
8406 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
8407 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
8408 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
8411 ; AVX2-LABEL: ugt_26_v8i32:
8413 ; AVX2-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]
8414 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
8415 ; AVX2-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]
8416 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
8417 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
8418 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
8419 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
8420 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
8421 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
8422 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
8423 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8424 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8425 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8426 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8427 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8428 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [26,26,26,26,26,26,26,26]
8429 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8432 ; AVX512VPOPCNTDQ-LABEL: ugt_26_v8i32:
8433 ; AVX512VPOPCNTDQ: # %bb.0:
8434 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8435 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8436 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [26,26,26,26,26,26,26,26]
8437 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8438 ; AVX512VPOPCNTDQ-NEXT: retq
8440 ; AVX512VPOPCNTDQVL-LABEL: ugt_26_v8i32:
8441 ; AVX512VPOPCNTDQVL: # %bb.0:
8442 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
8443 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [26,26,26,26,26,26,26,26]
8444 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8445 ; AVX512VPOPCNTDQVL-NEXT: retq
8447 ; BITALG_NOVLX-LABEL: ugt_26_v8i32:
8448 ; BITALG_NOVLX: # %bb.0:
8449 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8450 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
8451 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
8452 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8453 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8454 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8455 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8456 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8457 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [26,26,26,26,26,26,26,26]
8458 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8459 ; BITALG_NOVLX-NEXT: retq
8461 ; BITALG-LABEL: ugt_26_v8i32:
8463 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
8464 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8465 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8466 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8467 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8468 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8469 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8470 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [26,26,26,26,26,26,26,26]
8471 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8473 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
8474 %3 = icmp ugt <8 x i32> %2, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
8475 %4 = sext <8 x i1> %3 to <8 x i32>
8479 define <8 x i32> @ult_27_v8i32(<8 x i32> %0) {
8480 ; AVX1-LABEL: ult_27_v8i32:
8482 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8483 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
8484 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8485 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
8486 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
8487 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
8488 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
8489 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
8490 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
8491 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
8492 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
8493 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
8494 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
8495 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
8496 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
8497 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
8498 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
8499 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
8500 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
8501 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
8502 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
8503 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
8504 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
8505 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
8506 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
8507 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
8508 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [27,27,27,27]
8509 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
8510 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
8511 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
8514 ; AVX2-LABEL: ult_27_v8i32:
8516 ; AVX2-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]
8517 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
8518 ; AVX2-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]
8519 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
8520 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
8521 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
8522 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
8523 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
8524 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
8525 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
8526 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8527 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8528 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8529 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8530 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8531 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [27,27,27,27,27,27,27,27]
8532 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8535 ; AVX512VPOPCNTDQ-LABEL: ult_27_v8i32:
8536 ; AVX512VPOPCNTDQ: # %bb.0:
8537 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8538 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8539 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [27,27,27,27,27,27,27,27]
8540 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8541 ; AVX512VPOPCNTDQ-NEXT: retq
8543 ; AVX512VPOPCNTDQVL-LABEL: ult_27_v8i32:
8544 ; AVX512VPOPCNTDQVL: # %bb.0:
8545 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
8546 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [27,27,27,27,27,27,27,27]
8547 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8548 ; AVX512VPOPCNTDQVL-NEXT: retq
8550 ; BITALG_NOVLX-LABEL: ult_27_v8i32:
8551 ; BITALG_NOVLX: # %bb.0:
8552 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8553 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
8554 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
8555 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8556 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8557 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8558 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8559 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8560 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [27,27,27,27,27,27,27,27]
8561 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8562 ; BITALG_NOVLX-NEXT: retq
8564 ; BITALG-LABEL: ult_27_v8i32:
8566 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
8567 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8568 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8569 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8570 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8571 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8572 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8573 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [27,27,27,27,27,27,27,27]
8574 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8576 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
8577 %3 = icmp ult <8 x i32> %2, <i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27>
8578 %4 = sext <8 x i1> %3 to <8 x i32>
8582 define <8 x i32> @ugt_27_v8i32(<8 x i32> %0) {
8583 ; AVX1-LABEL: ugt_27_v8i32:
8585 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8586 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
8587 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8588 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
8589 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
8590 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
8591 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
8592 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
8593 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
8594 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
8595 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
8596 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
8597 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
8598 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
8599 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
8600 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
8601 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
8602 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
8603 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
8604 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
8605 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
8606 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
8607 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
8608 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
8609 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
8610 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
8611 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [27,27,27,27]
8612 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
8613 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
8614 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
8617 ; AVX2-LABEL: ugt_27_v8i32:
8619 ; AVX2-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]
8620 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
8621 ; AVX2-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]
8622 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
8623 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
8624 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
8625 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
8626 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
8627 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
8628 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
8629 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8630 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8631 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8632 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8633 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8634 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [27,27,27,27,27,27,27,27]
8635 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8638 ; AVX512VPOPCNTDQ-LABEL: ugt_27_v8i32:
8639 ; AVX512VPOPCNTDQ: # %bb.0:
8640 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8641 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8642 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [27,27,27,27,27,27,27,27]
8643 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8644 ; AVX512VPOPCNTDQ-NEXT: retq
8646 ; AVX512VPOPCNTDQVL-LABEL: ugt_27_v8i32:
8647 ; AVX512VPOPCNTDQVL: # %bb.0:
8648 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
8649 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [27,27,27,27,27,27,27,27]
8650 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8651 ; AVX512VPOPCNTDQVL-NEXT: retq
8653 ; BITALG_NOVLX-LABEL: ugt_27_v8i32:
8654 ; BITALG_NOVLX: # %bb.0:
8655 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8656 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
8657 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
8658 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8659 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8660 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8661 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8662 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8663 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [27,27,27,27,27,27,27,27]
8664 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8665 ; BITALG_NOVLX-NEXT: retq
8667 ; BITALG-LABEL: ugt_27_v8i32:
8669 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
8670 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8671 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8672 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8673 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8674 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8675 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8676 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [27,27,27,27,27,27,27,27]
8677 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8679 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
8680 %3 = icmp ugt <8 x i32> %2, <i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27>
8681 %4 = sext <8 x i1> %3 to <8 x i32>
8685 define <8 x i32> @ult_28_v8i32(<8 x i32> %0) {
8686 ; AVX1-LABEL: ult_28_v8i32:
8688 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8689 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
8690 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8691 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
8692 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
8693 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
8694 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
8695 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
8696 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
8697 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
8698 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
8699 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
8700 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
8701 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
8702 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
8703 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
8704 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
8705 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
8706 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
8707 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
8708 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
8709 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
8710 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
8711 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
8712 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
8713 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
8714 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [28,28,28,28]
8715 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
8716 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
8717 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
8720 ; AVX2-LABEL: ult_28_v8i32:
8722 ; AVX2-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]
8723 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
8724 ; AVX2-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]
8725 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
8726 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
8727 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
8728 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
8729 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
8730 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
8731 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
8732 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8733 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8734 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8735 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8736 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8737 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [28,28,28,28,28,28,28,28]
8738 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8741 ; AVX512VPOPCNTDQ-LABEL: ult_28_v8i32:
8742 ; AVX512VPOPCNTDQ: # %bb.0:
8743 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8744 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8745 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [28,28,28,28,28,28,28,28]
8746 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8747 ; AVX512VPOPCNTDQ-NEXT: retq
8749 ; AVX512VPOPCNTDQVL-LABEL: ult_28_v8i32:
8750 ; AVX512VPOPCNTDQVL: # %bb.0:
8751 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
8752 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [28,28,28,28,28,28,28,28]
8753 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8754 ; AVX512VPOPCNTDQVL-NEXT: retq
8756 ; BITALG_NOVLX-LABEL: ult_28_v8i32:
8757 ; BITALG_NOVLX: # %bb.0:
8758 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8759 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
8760 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
8761 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8762 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8763 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8764 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8765 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8766 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [28,28,28,28,28,28,28,28]
8767 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8768 ; BITALG_NOVLX-NEXT: retq
8770 ; BITALG-LABEL: ult_28_v8i32:
8772 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
8773 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8774 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8775 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8776 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8777 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8778 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8779 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [28,28,28,28,28,28,28,28]
8780 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8782 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
8783 %3 = icmp ult <8 x i32> %2, <i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28>
8784 %4 = sext <8 x i1> %3 to <8 x i32>
8788 define <8 x i32> @ugt_28_v8i32(<8 x i32> %0) {
8789 ; AVX1-LABEL: ugt_28_v8i32:
8791 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8792 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
8793 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8794 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
8795 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
8796 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
8797 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
8798 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
8799 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
8800 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
8801 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
8802 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
8803 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
8804 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
8805 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
8806 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
8807 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
8808 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
8809 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
8810 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
8811 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
8812 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
8813 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
8814 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
8815 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
8816 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
8817 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [28,28,28,28]
8818 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
8819 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
8820 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
8823 ; AVX2-LABEL: ugt_28_v8i32:
8825 ; AVX2-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]
8826 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
8827 ; AVX2-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]
8828 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
8829 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
8830 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
8831 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
8832 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
8833 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
8834 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
8835 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8836 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8837 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8838 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8839 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8840 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [28,28,28,28,28,28,28,28]
8841 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8844 ; AVX512VPOPCNTDQ-LABEL: ugt_28_v8i32:
8845 ; AVX512VPOPCNTDQ: # %bb.0:
8846 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8847 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8848 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [28,28,28,28,28,28,28,28]
8849 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8850 ; AVX512VPOPCNTDQ-NEXT: retq
8852 ; AVX512VPOPCNTDQVL-LABEL: ugt_28_v8i32:
8853 ; AVX512VPOPCNTDQVL: # %bb.0:
8854 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
8855 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [28,28,28,28,28,28,28,28]
8856 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8857 ; AVX512VPOPCNTDQVL-NEXT: retq
8859 ; BITALG_NOVLX-LABEL: ugt_28_v8i32:
8860 ; BITALG_NOVLX: # %bb.0:
8861 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8862 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
8863 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
8864 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8865 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8866 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8867 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8868 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8869 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [28,28,28,28,28,28,28,28]
8870 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8871 ; BITALG_NOVLX-NEXT: retq
8873 ; BITALG-LABEL: ugt_28_v8i32:
8875 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
8876 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8877 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8878 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8879 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8880 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8881 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8882 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [28,28,28,28,28,28,28,28]
8883 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
8885 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
8886 %3 = icmp ugt <8 x i32> %2, <i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28>
8887 %4 = sext <8 x i1> %3 to <8 x i32>
8891 define <8 x i32> @ult_29_v8i32(<8 x i32> %0) {
8892 ; AVX1-LABEL: ult_29_v8i32:
8894 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8895 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
8896 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8897 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
8898 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
8899 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
8900 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
8901 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
8902 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
8903 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
8904 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
8905 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
8906 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
8907 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
8908 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
8909 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
8910 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
8911 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
8912 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
8913 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
8914 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
8915 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
8916 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
8917 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
8918 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
8919 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
8920 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [29,29,29,29]
8921 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
8922 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
8923 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
8926 ; AVX2-LABEL: ult_29_v8i32:
8928 ; AVX2-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]
8929 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
8930 ; AVX2-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]
8931 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
8932 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
8933 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
8934 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
8935 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
8936 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
8937 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
8938 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8939 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8940 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8941 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8942 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8943 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [29,29,29,29,29,29,29,29]
8944 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8947 ; AVX512VPOPCNTDQ-LABEL: ult_29_v8i32:
8948 ; AVX512VPOPCNTDQ: # %bb.0:
8949 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8950 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8951 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [29,29,29,29,29,29,29,29]
8952 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8953 ; AVX512VPOPCNTDQ-NEXT: retq
8955 ; AVX512VPOPCNTDQVL-LABEL: ult_29_v8i32:
8956 ; AVX512VPOPCNTDQVL: # %bb.0:
8957 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
8958 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [29,29,29,29,29,29,29,29]
8959 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8960 ; AVX512VPOPCNTDQVL-NEXT: retq
8962 ; BITALG_NOVLX-LABEL: ult_29_v8i32:
8963 ; BITALG_NOVLX: # %bb.0:
8964 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
8965 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
8966 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
8967 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8968 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8969 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8970 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8971 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8972 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [29,29,29,29,29,29,29,29]
8973 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8974 ; BITALG_NOVLX-NEXT: retq
8976 ; BITALG-LABEL: ult_29_v8i32:
8978 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
8979 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8980 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
8981 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
8982 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
8983 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
8984 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8985 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [29,29,29,29,29,29,29,29]
8986 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
8988 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
8989 %3 = icmp ult <8 x i32> %2, <i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29>
8990 %4 = sext <8 x i1> %3 to <8 x i32>
8994 define <8 x i32> @ugt_29_v8i32(<8 x i32> %0) {
8995 ; AVX1-LABEL: ugt_29_v8i32:
8997 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8998 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
8999 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9000 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
9001 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
9002 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
9003 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
9004 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
9005 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
9006 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
9007 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
9008 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
9009 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
9010 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
9011 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
9012 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
9013 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
9014 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
9015 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
9016 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
9017 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
9018 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
9019 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
9020 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
9021 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
9022 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
9023 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [29,29,29,29]
9024 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
9025 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
9026 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
9029 ; AVX2-LABEL: ugt_29_v8i32:
9031 ; AVX2-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]
9032 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
9033 ; AVX2-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]
9034 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
9035 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
9036 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
9037 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9038 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
9039 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
9040 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9041 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9042 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9043 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9044 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9045 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9046 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [29,29,29,29,29,29,29,29]
9047 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
9050 ; AVX512VPOPCNTDQ-LABEL: ugt_29_v8i32:
9051 ; AVX512VPOPCNTDQ: # %bb.0:
9052 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9053 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
9054 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [29,29,29,29,29,29,29,29]
9055 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
9056 ; AVX512VPOPCNTDQ-NEXT: retq
9058 ; AVX512VPOPCNTDQVL-LABEL: ugt_29_v8i32:
9059 ; AVX512VPOPCNTDQVL: # %bb.0:
9060 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
9061 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [29,29,29,29,29,29,29,29]
9062 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
9063 ; AVX512VPOPCNTDQVL-NEXT: retq
9065 ; BITALG_NOVLX-LABEL: ugt_29_v8i32:
9066 ; BITALG_NOVLX: # %bb.0:
9067 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9068 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
9069 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9070 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9071 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9072 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9073 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9074 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9075 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [29,29,29,29,29,29,29,29]
9076 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
9077 ; BITALG_NOVLX-NEXT: retq
9079 ; BITALG-LABEL: ugt_29_v8i32:
9081 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
9082 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9083 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9084 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9085 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9086 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9087 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9088 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [29,29,29,29,29,29,29,29]
9089 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
9091 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
9092 %3 = icmp ugt <8 x i32> %2, <i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29>
9093 %4 = sext <8 x i1> %3 to <8 x i32>
9097 define <8 x i32> @ult_30_v8i32(<8 x i32> %0) {
9098 ; AVX1-LABEL: ult_30_v8i32:
9100 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9101 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
9102 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9103 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
9104 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
9105 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
9106 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
9107 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
9108 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
9109 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
9110 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
9111 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
9112 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
9113 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
9114 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
9115 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
9116 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
9117 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
9118 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
9119 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
9120 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
9121 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
9122 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
9123 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
9124 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
9125 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
9126 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [30,30,30,30]
9127 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
9128 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
9129 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
9132 ; AVX2-LABEL: ult_30_v8i32:
9134 ; AVX2-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]
9135 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
9136 ; AVX2-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]
9137 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
9138 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
9139 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
9140 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9141 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
9142 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
9143 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9144 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9145 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9146 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9147 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9148 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9149 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [30,30,30,30,30,30,30,30]
9150 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9153 ; AVX512VPOPCNTDQ-LABEL: ult_30_v8i32:
9154 ; AVX512VPOPCNTDQ: # %bb.0:
9155 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9156 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
9157 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [30,30,30,30,30,30,30,30]
9158 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9159 ; AVX512VPOPCNTDQ-NEXT: retq
9161 ; AVX512VPOPCNTDQVL-LABEL: ult_30_v8i32:
9162 ; AVX512VPOPCNTDQVL: # %bb.0:
9163 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
9164 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [30,30,30,30,30,30,30,30]
9165 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9166 ; AVX512VPOPCNTDQVL-NEXT: retq
9168 ; BITALG_NOVLX-LABEL: ult_30_v8i32:
9169 ; BITALG_NOVLX: # %bb.0:
9170 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9171 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
9172 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9173 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9174 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9175 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9176 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9177 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9178 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [30,30,30,30,30,30,30,30]
9179 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9180 ; BITALG_NOVLX-NEXT: retq
9182 ; BITALG-LABEL: ult_30_v8i32:
9184 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
9185 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9186 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9187 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9188 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9189 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9190 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9191 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [30,30,30,30,30,30,30,30]
9192 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9194 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
9195 %3 = icmp ult <8 x i32> %2, <i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30>
9196 %4 = sext <8 x i1> %3 to <8 x i32>
9200 define <8 x i32> @ugt_30_v8i32(<8 x i32> %0) {
9201 ; AVX1-LABEL: ugt_30_v8i32:
9203 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9204 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
9205 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9206 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
9207 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
9208 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
9209 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
9210 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
9211 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
9212 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
9213 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
9214 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
9215 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
9216 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
9217 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
9218 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
9219 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
9220 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
9221 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
9222 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
9223 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
9224 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
9225 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
9226 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
9227 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
9228 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
9229 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [30,30,30,30]
9230 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm0, %xmm0
9231 ; AVX1-NEXT: vpcmpgtd %xmm1, %xmm2, %xmm1
9232 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
9235 ; AVX2-LABEL: ugt_30_v8i32:
9237 ; AVX2-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]
9238 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
9239 ; AVX2-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]
9240 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
9241 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
9242 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
9243 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9244 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
9245 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
9246 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9247 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9248 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9249 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9250 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9251 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9252 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [30,30,30,30,30,30,30,30]
9253 ; AVX2-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
9256 ; AVX512VPOPCNTDQ-LABEL: ugt_30_v8i32:
9257 ; AVX512VPOPCNTDQ: # %bb.0:
9258 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9259 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
9260 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [30,30,30,30,30,30,30,30]
9261 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
9262 ; AVX512VPOPCNTDQ-NEXT: retq
9264 ; AVX512VPOPCNTDQVL-LABEL: ugt_30_v8i32:
9265 ; AVX512VPOPCNTDQVL: # %bb.0:
9266 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
9267 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [30,30,30,30,30,30,30,30]
9268 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
9269 ; AVX512VPOPCNTDQVL-NEXT: retq
9271 ; BITALG_NOVLX-LABEL: ugt_30_v8i32:
9272 ; BITALG_NOVLX: # %bb.0:
9273 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9274 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
9275 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9276 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9277 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9278 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9279 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9280 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9281 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [30,30,30,30,30,30,30,30]
9282 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
9283 ; BITALG_NOVLX-NEXT: retq
9285 ; BITALG-LABEL: ugt_30_v8i32:
9287 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
9288 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9289 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9290 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9291 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9292 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9293 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9294 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [30,30,30,30,30,30,30,30]
9295 ; BITALG-NEXT: vpcmpgtd %ymm1, %ymm0, %ymm0
9297 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
9298 %3 = icmp ugt <8 x i32> %2, <i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30>
9299 %4 = sext <8 x i1> %3 to <8 x i32>
9303 define <8 x i32> @ult_31_v8i32(<8 x i32> %0) {
9304 ; AVX1-LABEL: ult_31_v8i32:
9306 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9307 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
9308 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9309 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
9310 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
9311 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
9312 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
9313 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
9314 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
9315 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm5 = xmm2[2],xmm4[2],xmm2[3],xmm4[3]
9316 ; AVX1-NEXT: vpsadbw %xmm4, %xmm5, %xmm5
9317 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm2 = xmm2[0],zero,xmm2[1],zero
9318 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
9319 ; AVX1-NEXT: vpackuswb %xmm5, %xmm2, %xmm2
9320 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
9321 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
9322 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
9323 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
9324 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
9325 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
9326 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
9327 ; AVX1-NEXT: vpunpckhdq {{.*#+}} xmm1 = xmm0[2],xmm4[2],xmm0[3],xmm4[3]
9328 ; AVX1-NEXT: vpsadbw %xmm4, %xmm1, %xmm1
9329 ; AVX1-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
9330 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
9331 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
9332 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [31,31,31,31]
9333 ; AVX1-NEXT: vpcmpgtd %xmm0, %xmm1, %xmm0
9334 ; AVX1-NEXT: vpcmpgtd %xmm2, %xmm1, %xmm1
9335 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
9338 ; AVX2-LABEL: ult_31_v8i32:
9340 ; AVX2-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]
9341 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
9342 ; AVX2-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]
9343 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
9344 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
9345 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
9346 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9347 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
9348 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
9349 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9350 ; AVX2-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9351 ; AVX2-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9352 ; AVX2-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9353 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9354 ; AVX2-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9355 ; AVX2-NEXT: vpbroadcastd {{.*#+}} ymm1 = [31,31,31,31,31,31,31,31]
9356 ; AVX2-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9359 ; AVX512VPOPCNTDQ-LABEL: ult_31_v8i32:
9360 ; AVX512VPOPCNTDQ: # %bb.0:
9361 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9362 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
9363 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastd {{.*#+}} ymm1 = [31,31,31,31,31,31,31,31]
9364 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9365 ; AVX512VPOPCNTDQ-NEXT: retq
9367 ; AVX512VPOPCNTDQVL-LABEL: ult_31_v8i32:
9368 ; AVX512VPOPCNTDQVL: # %bb.0:
9369 ; AVX512VPOPCNTDQVL-NEXT: vpopcntd %ymm0, %ymm0
9370 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastd {{.*#+}} ymm1 = [31,31,31,31,31,31,31,31]
9371 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9372 ; AVX512VPOPCNTDQVL-NEXT: retq
9374 ; BITALG_NOVLX-LABEL: ult_31_v8i32:
9375 ; BITALG_NOVLX: # %bb.0:
9376 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9377 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
9378 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9379 ; BITALG_NOVLX-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9380 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9381 ; BITALG_NOVLX-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9382 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9383 ; BITALG_NOVLX-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9384 ; BITALG_NOVLX-NEXT: vpbroadcastd {{.*#+}} ymm1 = [31,31,31,31,31,31,31,31]
9385 ; BITALG_NOVLX-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9386 ; BITALG_NOVLX-NEXT: retq
9388 ; BITALG-LABEL: ult_31_v8i32:
9390 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
9391 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9392 ; BITALG-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
9393 ; BITALG-NEXT: vpsadbw %ymm1, %ymm2, %ymm2
9394 ; BITALG-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
9395 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9396 ; BITALG-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
9397 ; BITALG-NEXT: vpbroadcastd {{.*#+}} ymm1 = [31,31,31,31,31,31,31,31]
9398 ; BITALG-NEXT: vpcmpgtd %ymm0, %ymm1, %ymm0
9400 %2 = tail call <8 x i32> @llvm.ctpop.v8i32(<8 x i32> %0)
9401 %3 = icmp ult <8 x i32> %2, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
9402 %4 = sext <8 x i1> %3 to <8 x i32>
9406 define <4 x i64> @ugt_1_v4i64(<4 x i64> %0) {
9407 ; AVX1-LABEL: ugt_1_v4i64:
9409 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
9410 ; AVX1-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
9411 ; AVX1-NEXT: vpaddq %xmm2, %xmm1, %xmm3
9412 ; AVX1-NEXT: vpand %xmm3, %xmm1, %xmm1
9413 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
9414 ; AVX1-NEXT: vpcmpeqq %xmm3, %xmm1, %xmm1
9415 ; AVX1-NEXT: vpxor %xmm2, %xmm1, %xmm1
9416 ; AVX1-NEXT: vpaddq %xmm2, %xmm0, %xmm4
9417 ; AVX1-NEXT: vpand %xmm4, %xmm0, %xmm0
9418 ; AVX1-NEXT: vpcmpeqq %xmm3, %xmm0, %xmm0
9419 ; AVX1-NEXT: vpxor %xmm2, %xmm0, %xmm0
9420 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
9423 ; AVX2-LABEL: ugt_1_v4i64:
9425 ; AVX2-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
9426 ; AVX2-NEXT: vpaddq %ymm1, %ymm0, %ymm2
9427 ; AVX2-NEXT: vpand %ymm2, %ymm0, %ymm0
9428 ; AVX2-NEXT: vpxor %xmm2, %xmm2, %xmm2
9429 ; AVX2-NEXT: vpcmpeqq %ymm2, %ymm0, %ymm0
9430 ; AVX2-NEXT: vpxor %ymm1, %ymm0, %ymm0
9433 ; AVX512VPOPCNTDQ-LABEL: ugt_1_v4i64:
9434 ; AVX512VPOPCNTDQ: # %bb.0:
9435 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9436 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9437 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [1,1,1,1]
9438 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9439 ; AVX512VPOPCNTDQ-NEXT: retq
9441 ; AVX512VPOPCNTDQVL-LABEL: ugt_1_v4i64:
9442 ; AVX512VPOPCNTDQVL: # %bb.0:
9443 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
9444 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [1,1,1,1]
9445 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9446 ; AVX512VPOPCNTDQVL-NEXT: retq
9448 ; BITALG_NOVLX-LABEL: ugt_1_v4i64:
9449 ; BITALG_NOVLX: # %bb.0:
9450 ; BITALG_NOVLX-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
9451 ; BITALG_NOVLX-NEXT: vpaddq %ymm1, %ymm0, %ymm1
9452 ; BITALG_NOVLX-NEXT: vpand %ymm1, %ymm0, %ymm0
9453 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9454 ; BITALG_NOVLX-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
9455 ; BITALG_NOVLX-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
9456 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
9457 ; BITALG_NOVLX-NEXT: retq
9459 ; BITALG-LABEL: ugt_1_v4i64:
9461 ; BITALG-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
9462 ; BITALG-NEXT: vpaddq %ymm1, %ymm0, %ymm1
9463 ; BITALG-NEXT: vpand %ymm1, %ymm0, %ymm0
9464 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9465 ; BITALG-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
9466 ; BITALG-NEXT: vpternlogq $15, %ymm0, %ymm0, %ymm0
9468 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
9469 %3 = icmp ugt <4 x i64> %2, <i64 1, i64 1, i64 1, i64 1>
9470 %4 = sext <4 x i1> %3 to <4 x i64>
9474 define <4 x i64> @ult_2_v4i64(<4 x i64> %0) {
9475 ; AVX1-LABEL: ult_2_v4i64:
9477 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
9478 ; AVX1-NEXT: vpcmpeqd %xmm2, %xmm2, %xmm2
9479 ; AVX1-NEXT: vpaddq %xmm2, %xmm1, %xmm3
9480 ; AVX1-NEXT: vpand %xmm3, %xmm1, %xmm1
9481 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
9482 ; AVX1-NEXT: vpcmpeqq %xmm3, %xmm1, %xmm1
9483 ; AVX1-NEXT: vpaddq %xmm2, %xmm0, %xmm2
9484 ; AVX1-NEXT: vpand %xmm2, %xmm0, %xmm0
9485 ; AVX1-NEXT: vpcmpeqq %xmm3, %xmm0, %xmm0
9486 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
9489 ; AVX2-LABEL: ult_2_v4i64:
9491 ; AVX2-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
9492 ; AVX2-NEXT: vpaddq %ymm1, %ymm0, %ymm1
9493 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9494 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9495 ; AVX2-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
9498 ; AVX512VPOPCNTDQ-LABEL: ult_2_v4i64:
9499 ; AVX512VPOPCNTDQ: # %bb.0:
9500 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9501 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9502 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [2,2,2,2]
9503 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9504 ; AVX512VPOPCNTDQ-NEXT: retq
9506 ; AVX512VPOPCNTDQVL-LABEL: ult_2_v4i64:
9507 ; AVX512VPOPCNTDQVL: # %bb.0:
9508 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
9509 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [2,2,2,2]
9510 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9511 ; AVX512VPOPCNTDQVL-NEXT: retq
9513 ; BITALG_NOVLX-LABEL: ult_2_v4i64:
9514 ; BITALG_NOVLX: # %bb.0:
9515 ; BITALG_NOVLX-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
9516 ; BITALG_NOVLX-NEXT: vpaddq %ymm1, %ymm0, %ymm1
9517 ; BITALG_NOVLX-NEXT: vpand %ymm1, %ymm0, %ymm0
9518 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9519 ; BITALG_NOVLX-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
9520 ; BITALG_NOVLX-NEXT: retq
9522 ; BITALG-LABEL: ult_2_v4i64:
9524 ; BITALG-NEXT: vpcmpeqd %ymm1, %ymm1, %ymm1
9525 ; BITALG-NEXT: vpaddq %ymm1, %ymm0, %ymm1
9526 ; BITALG-NEXT: vpand %ymm1, %ymm0, %ymm0
9527 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9528 ; BITALG-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
9530 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
9531 %3 = icmp ult <4 x i64> %2, <i64 2, i64 2, i64 2, i64 2>
9532 %4 = sext <4 x i1> %3 to <4 x i64>
9536 define <4 x i64> @ugt_2_v4i64(<4 x i64> %0) {
9537 ; AVX1-LABEL: ugt_2_v4i64:
9539 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9540 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
9541 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9542 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
9543 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
9544 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
9545 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
9546 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
9547 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
9548 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
9549 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
9550 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
9551 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
9552 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
9553 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
9554 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
9555 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
9556 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
9557 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [2,2]
9558 ; AVX1-NEXT: # xmm1 = mem[0,0]
9559 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
9560 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
9561 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
9564 ; AVX2-LABEL: ugt_2_v4i64:
9566 ; AVX2-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]
9567 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
9568 ; AVX2-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]
9569 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
9570 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
9571 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
9572 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9573 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
9574 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
9575 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9576 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9577 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [2,2,2,2]
9578 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9581 ; AVX512VPOPCNTDQ-LABEL: ugt_2_v4i64:
9582 ; AVX512VPOPCNTDQ: # %bb.0:
9583 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9584 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9585 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [2,2,2,2]
9586 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9587 ; AVX512VPOPCNTDQ-NEXT: retq
9589 ; AVX512VPOPCNTDQVL-LABEL: ugt_2_v4i64:
9590 ; AVX512VPOPCNTDQVL: # %bb.0:
9591 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
9592 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [2,2,2,2]
9593 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9594 ; AVX512VPOPCNTDQVL-NEXT: retq
9596 ; BITALG_NOVLX-LABEL: ugt_2_v4i64:
9597 ; BITALG_NOVLX: # %bb.0:
9598 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9599 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
9600 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9601 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9602 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [2,2,2,2]
9603 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9604 ; BITALG_NOVLX-NEXT: retq
9606 ; BITALG-LABEL: ugt_2_v4i64:
9608 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
9609 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9610 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9611 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [2,2,2,2]
9612 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9614 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
9615 %3 = icmp ugt <4 x i64> %2, <i64 2, i64 2, i64 2, i64 2>
9616 %4 = sext <4 x i1> %3 to <4 x i64>
9620 define <4 x i64> @ult_3_v4i64(<4 x i64> %0) {
9621 ; AVX1-LABEL: ult_3_v4i64:
9623 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9624 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
9625 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9626 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
9627 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
9628 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
9629 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
9630 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
9631 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
9632 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
9633 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
9634 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
9635 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
9636 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
9637 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
9638 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
9639 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
9640 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
9641 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [3,3]
9642 ; AVX1-NEXT: # xmm1 = mem[0,0]
9643 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
9644 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
9645 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
9648 ; AVX2-LABEL: ult_3_v4i64:
9650 ; AVX2-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]
9651 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
9652 ; AVX2-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]
9653 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
9654 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
9655 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
9656 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9657 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
9658 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
9659 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9660 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9661 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [3,3,3,3]
9662 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9665 ; AVX512VPOPCNTDQ-LABEL: ult_3_v4i64:
9666 ; AVX512VPOPCNTDQ: # %bb.0:
9667 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9668 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9669 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [3,3,3,3]
9670 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9671 ; AVX512VPOPCNTDQ-NEXT: retq
9673 ; AVX512VPOPCNTDQVL-LABEL: ult_3_v4i64:
9674 ; AVX512VPOPCNTDQVL: # %bb.0:
9675 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
9676 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [3,3,3,3]
9677 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9678 ; AVX512VPOPCNTDQVL-NEXT: retq
9680 ; BITALG_NOVLX-LABEL: ult_3_v4i64:
9681 ; BITALG_NOVLX: # %bb.0:
9682 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9683 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
9684 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9685 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9686 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [3,3,3,3]
9687 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9688 ; BITALG_NOVLX-NEXT: retq
9690 ; BITALG-LABEL: ult_3_v4i64:
9692 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
9693 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9694 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9695 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [3,3,3,3]
9696 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9698 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
9699 %3 = icmp ult <4 x i64> %2, <i64 3, i64 3, i64 3, i64 3>
9700 %4 = sext <4 x i1> %3 to <4 x i64>
9704 define <4 x i64> @ugt_3_v4i64(<4 x i64> %0) {
9705 ; AVX1-LABEL: ugt_3_v4i64:
9707 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9708 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
9709 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9710 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
9711 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
9712 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
9713 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
9714 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
9715 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
9716 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
9717 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
9718 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
9719 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
9720 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
9721 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
9722 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
9723 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
9724 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
9725 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [3,3]
9726 ; AVX1-NEXT: # xmm1 = mem[0,0]
9727 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
9728 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
9729 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
9732 ; AVX2-LABEL: ugt_3_v4i64:
9734 ; AVX2-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]
9735 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
9736 ; AVX2-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]
9737 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
9738 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
9739 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
9740 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9741 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
9742 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
9743 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9744 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9745 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [3,3,3,3]
9746 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9749 ; AVX512VPOPCNTDQ-LABEL: ugt_3_v4i64:
9750 ; AVX512VPOPCNTDQ: # %bb.0:
9751 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9752 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9753 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [3,3,3,3]
9754 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9755 ; AVX512VPOPCNTDQ-NEXT: retq
9757 ; AVX512VPOPCNTDQVL-LABEL: ugt_3_v4i64:
9758 ; AVX512VPOPCNTDQVL: # %bb.0:
9759 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
9760 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [3,3,3,3]
9761 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9762 ; AVX512VPOPCNTDQVL-NEXT: retq
9764 ; BITALG_NOVLX-LABEL: ugt_3_v4i64:
9765 ; BITALG_NOVLX: # %bb.0:
9766 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9767 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
9768 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9769 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9770 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [3,3,3,3]
9771 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9772 ; BITALG_NOVLX-NEXT: retq
9774 ; BITALG-LABEL: ugt_3_v4i64:
9776 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
9777 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9778 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9779 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [3,3,3,3]
9780 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9782 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
9783 %3 = icmp ugt <4 x i64> %2, <i64 3, i64 3, i64 3, i64 3>
9784 %4 = sext <4 x i1> %3 to <4 x i64>
9788 define <4 x i64> @ult_4_v4i64(<4 x i64> %0) {
9789 ; AVX1-LABEL: ult_4_v4i64:
9791 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9792 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
9793 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9794 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
9795 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
9796 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
9797 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
9798 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
9799 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
9800 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
9801 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
9802 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
9803 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
9804 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
9805 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
9806 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
9807 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
9808 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
9809 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [4,4]
9810 ; AVX1-NEXT: # xmm1 = mem[0,0]
9811 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
9812 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
9813 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
9816 ; AVX2-LABEL: ult_4_v4i64:
9818 ; AVX2-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]
9819 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
9820 ; AVX2-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]
9821 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
9822 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
9823 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
9824 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9825 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
9826 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
9827 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9828 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9829 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4,4,4,4]
9830 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9833 ; AVX512VPOPCNTDQ-LABEL: ult_4_v4i64:
9834 ; AVX512VPOPCNTDQ: # %bb.0:
9835 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9836 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9837 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4,4,4,4]
9838 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9839 ; AVX512VPOPCNTDQ-NEXT: retq
9841 ; AVX512VPOPCNTDQVL-LABEL: ult_4_v4i64:
9842 ; AVX512VPOPCNTDQVL: # %bb.0:
9843 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
9844 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4,4,4,4]
9845 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9846 ; AVX512VPOPCNTDQVL-NEXT: retq
9848 ; BITALG_NOVLX-LABEL: ult_4_v4i64:
9849 ; BITALG_NOVLX: # %bb.0:
9850 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9851 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
9852 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9853 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9854 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4,4,4,4]
9855 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9856 ; BITALG_NOVLX-NEXT: retq
9858 ; BITALG-LABEL: ult_4_v4i64:
9860 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
9861 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9862 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9863 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4,4,4,4]
9864 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
9866 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
9867 %3 = icmp ult <4 x i64> %2, <i64 4, i64 4, i64 4, i64 4>
9868 %4 = sext <4 x i1> %3 to <4 x i64>
9872 define <4 x i64> @ugt_4_v4i64(<4 x i64> %0) {
9873 ; AVX1-LABEL: ugt_4_v4i64:
9875 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9876 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
9877 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9878 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
9879 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
9880 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
9881 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
9882 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
9883 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
9884 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
9885 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
9886 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
9887 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
9888 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
9889 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
9890 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
9891 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
9892 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
9893 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [4,4]
9894 ; AVX1-NEXT: # xmm1 = mem[0,0]
9895 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
9896 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
9897 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
9900 ; AVX2-LABEL: ugt_4_v4i64:
9902 ; AVX2-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]
9903 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
9904 ; AVX2-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]
9905 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
9906 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
9907 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
9908 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9909 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
9910 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
9911 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9912 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9913 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4,4,4,4]
9914 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9917 ; AVX512VPOPCNTDQ-LABEL: ugt_4_v4i64:
9918 ; AVX512VPOPCNTDQ: # %bb.0:
9919 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9920 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9921 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4,4,4,4]
9922 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9923 ; AVX512VPOPCNTDQ-NEXT: retq
9925 ; AVX512VPOPCNTDQVL-LABEL: ugt_4_v4i64:
9926 ; AVX512VPOPCNTDQVL: # %bb.0:
9927 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
9928 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4,4,4,4]
9929 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9930 ; AVX512VPOPCNTDQVL-NEXT: retq
9932 ; BITALG_NOVLX-LABEL: ugt_4_v4i64:
9933 ; BITALG_NOVLX: # %bb.0:
9934 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
9935 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
9936 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
9937 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9938 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4,4,4,4]
9939 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9940 ; BITALG_NOVLX-NEXT: retq
9942 ; BITALG-LABEL: ugt_4_v4i64:
9944 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
9945 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9946 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9947 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [4,4,4,4]
9948 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
9950 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
9951 %3 = icmp ugt <4 x i64> %2, <i64 4, i64 4, i64 4, i64 4>
9952 %4 = sext <4 x i1> %3 to <4 x i64>
9956 define <4 x i64> @ult_5_v4i64(<4 x i64> %0) {
9957 ; AVX1-LABEL: ult_5_v4i64:
9959 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9960 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
9961 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9962 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
9963 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
9964 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
9965 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
9966 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
9967 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
9968 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
9969 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
9970 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
9971 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
9972 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
9973 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
9974 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
9975 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
9976 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
9977 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [5,5]
9978 ; AVX1-NEXT: # xmm1 = mem[0,0]
9979 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
9980 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
9981 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
9984 ; AVX2-LABEL: ult_5_v4i64:
9986 ; AVX2-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]
9987 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
9988 ; AVX2-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]
9989 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
9990 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
9991 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
9992 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
9993 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
9994 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
9995 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
9996 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
9997 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [5,5,5,5]
9998 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10001 ; AVX512VPOPCNTDQ-LABEL: ult_5_v4i64:
10002 ; AVX512VPOPCNTDQ: # %bb.0:
10003 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10004 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10005 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [5,5,5,5]
10006 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10007 ; AVX512VPOPCNTDQ-NEXT: retq
10009 ; AVX512VPOPCNTDQVL-LABEL: ult_5_v4i64:
10010 ; AVX512VPOPCNTDQVL: # %bb.0:
10011 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10012 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [5,5,5,5]
10013 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10014 ; AVX512VPOPCNTDQVL-NEXT: retq
10016 ; BITALG_NOVLX-LABEL: ult_5_v4i64:
10017 ; BITALG_NOVLX: # %bb.0:
10018 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10019 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10020 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10021 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10022 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [5,5,5,5]
10023 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10024 ; BITALG_NOVLX-NEXT: retq
10026 ; BITALG-LABEL: ult_5_v4i64:
10028 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10029 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10030 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10031 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [5,5,5,5]
10032 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10033 ; BITALG-NEXT: retq
10034 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10035 %3 = icmp ult <4 x i64> %2, <i64 5, i64 5, i64 5, i64 5>
10036 %4 = sext <4 x i1> %3 to <4 x i64>
10040 define <4 x i64> @ugt_5_v4i64(<4 x i64> %0) {
10041 ; AVX1-LABEL: ugt_5_v4i64:
10043 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10044 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10045 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10046 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10047 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10048 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10049 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10050 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10051 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10052 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10053 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10054 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10055 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10056 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10057 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10058 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10059 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10060 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10061 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [5,5]
10062 ; AVX1-NEXT: # xmm1 = mem[0,0]
10063 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
10064 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
10065 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10068 ; AVX2-LABEL: ugt_5_v4i64:
10070 ; AVX2-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]
10071 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10072 ; AVX2-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]
10073 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10074 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10075 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10076 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10077 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10078 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10079 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10080 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10081 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [5,5,5,5]
10082 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10085 ; AVX512VPOPCNTDQ-LABEL: ugt_5_v4i64:
10086 ; AVX512VPOPCNTDQ: # %bb.0:
10087 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10088 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10089 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [5,5,5,5]
10090 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10091 ; AVX512VPOPCNTDQ-NEXT: retq
10093 ; AVX512VPOPCNTDQVL-LABEL: ugt_5_v4i64:
10094 ; AVX512VPOPCNTDQVL: # %bb.0:
10095 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10096 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [5,5,5,5]
10097 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10098 ; AVX512VPOPCNTDQVL-NEXT: retq
10100 ; BITALG_NOVLX-LABEL: ugt_5_v4i64:
10101 ; BITALG_NOVLX: # %bb.0:
10102 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10103 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10104 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10105 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10106 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [5,5,5,5]
10107 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10108 ; BITALG_NOVLX-NEXT: retq
10110 ; BITALG-LABEL: ugt_5_v4i64:
10112 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10113 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10114 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10115 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [5,5,5,5]
10116 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10117 ; BITALG-NEXT: retq
10118 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10119 %3 = icmp ugt <4 x i64> %2, <i64 5, i64 5, i64 5, i64 5>
10120 %4 = sext <4 x i1> %3 to <4 x i64>
10124 define <4 x i64> @ult_6_v4i64(<4 x i64> %0) {
10125 ; AVX1-LABEL: ult_6_v4i64:
10127 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10128 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10129 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10130 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10131 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10132 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10133 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10134 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10135 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10136 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10137 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10138 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10139 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10140 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10141 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10142 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10143 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10144 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10145 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [6,6]
10146 ; AVX1-NEXT: # xmm1 = mem[0,0]
10147 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
10148 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
10149 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10152 ; AVX2-LABEL: ult_6_v4i64:
10154 ; AVX2-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]
10155 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10156 ; AVX2-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]
10157 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10158 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10159 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10160 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10161 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10162 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10163 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10164 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10165 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [6,6,6,6]
10166 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10169 ; AVX512VPOPCNTDQ-LABEL: ult_6_v4i64:
10170 ; AVX512VPOPCNTDQ: # %bb.0:
10171 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10172 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10173 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [6,6,6,6]
10174 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10175 ; AVX512VPOPCNTDQ-NEXT: retq
10177 ; AVX512VPOPCNTDQVL-LABEL: ult_6_v4i64:
10178 ; AVX512VPOPCNTDQVL: # %bb.0:
10179 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10180 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [6,6,6,6]
10181 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10182 ; AVX512VPOPCNTDQVL-NEXT: retq
10184 ; BITALG_NOVLX-LABEL: ult_6_v4i64:
10185 ; BITALG_NOVLX: # %bb.0:
10186 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10187 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10188 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10189 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10190 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [6,6,6,6]
10191 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10192 ; BITALG_NOVLX-NEXT: retq
10194 ; BITALG-LABEL: ult_6_v4i64:
10196 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10197 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10198 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10199 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [6,6,6,6]
10200 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10201 ; BITALG-NEXT: retq
10202 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10203 %3 = icmp ult <4 x i64> %2, <i64 6, i64 6, i64 6, i64 6>
10204 %4 = sext <4 x i1> %3 to <4 x i64>
10208 define <4 x i64> @ugt_6_v4i64(<4 x i64> %0) {
10209 ; AVX1-LABEL: ugt_6_v4i64:
10211 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10212 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10213 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10214 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10215 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10216 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10217 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10218 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10219 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10220 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10221 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10222 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10223 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10224 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10225 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10226 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10227 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10228 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10229 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [6,6]
10230 ; AVX1-NEXT: # xmm1 = mem[0,0]
10231 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
10232 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
10233 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10236 ; AVX2-LABEL: ugt_6_v4i64:
10238 ; AVX2-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]
10239 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10240 ; AVX2-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]
10241 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10242 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10243 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10244 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10245 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10246 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10247 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10248 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10249 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [6,6,6,6]
10250 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10253 ; AVX512VPOPCNTDQ-LABEL: ugt_6_v4i64:
10254 ; AVX512VPOPCNTDQ: # %bb.0:
10255 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10256 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10257 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [6,6,6,6]
10258 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10259 ; AVX512VPOPCNTDQ-NEXT: retq
10261 ; AVX512VPOPCNTDQVL-LABEL: ugt_6_v4i64:
10262 ; AVX512VPOPCNTDQVL: # %bb.0:
10263 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10264 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [6,6,6,6]
10265 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10266 ; AVX512VPOPCNTDQVL-NEXT: retq
10268 ; BITALG_NOVLX-LABEL: ugt_6_v4i64:
10269 ; BITALG_NOVLX: # %bb.0:
10270 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10271 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10272 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10273 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10274 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [6,6,6,6]
10275 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10276 ; BITALG_NOVLX-NEXT: retq
10278 ; BITALG-LABEL: ugt_6_v4i64:
10280 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10281 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10282 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10283 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [6,6,6,6]
10284 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10285 ; BITALG-NEXT: retq
10286 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10287 %3 = icmp ugt <4 x i64> %2, <i64 6, i64 6, i64 6, i64 6>
10288 %4 = sext <4 x i1> %3 to <4 x i64>
10292 define <4 x i64> @ult_7_v4i64(<4 x i64> %0) {
10293 ; AVX1-LABEL: ult_7_v4i64:
10295 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10296 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10297 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10298 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10299 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10300 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10301 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10302 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10303 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10304 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10305 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10306 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10307 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10308 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10309 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10310 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10311 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10312 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10313 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [7,7]
10314 ; AVX1-NEXT: # xmm1 = mem[0,0]
10315 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
10316 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
10317 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10320 ; AVX2-LABEL: ult_7_v4i64:
10322 ; AVX2-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]
10323 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10324 ; AVX2-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]
10325 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10326 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10327 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10328 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10329 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10330 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10331 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10332 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10333 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [7,7,7,7]
10334 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10337 ; AVX512VPOPCNTDQ-LABEL: ult_7_v4i64:
10338 ; AVX512VPOPCNTDQ: # %bb.0:
10339 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10340 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10341 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [7,7,7,7]
10342 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10343 ; AVX512VPOPCNTDQ-NEXT: retq
10345 ; AVX512VPOPCNTDQVL-LABEL: ult_7_v4i64:
10346 ; AVX512VPOPCNTDQVL: # %bb.0:
10347 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10348 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [7,7,7,7]
10349 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10350 ; AVX512VPOPCNTDQVL-NEXT: retq
10352 ; BITALG_NOVLX-LABEL: ult_7_v4i64:
10353 ; BITALG_NOVLX: # %bb.0:
10354 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10355 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10356 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10357 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10358 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [7,7,7,7]
10359 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10360 ; BITALG_NOVLX-NEXT: retq
10362 ; BITALG-LABEL: ult_7_v4i64:
10364 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10365 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10366 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10367 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [7,7,7,7]
10368 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10369 ; BITALG-NEXT: retq
10370 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10371 %3 = icmp ult <4 x i64> %2, <i64 7, i64 7, i64 7, i64 7>
10372 %4 = sext <4 x i1> %3 to <4 x i64>
10376 define <4 x i64> @ugt_7_v4i64(<4 x i64> %0) {
10377 ; AVX1-LABEL: ugt_7_v4i64:
10379 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10380 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10381 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10382 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10383 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10384 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10385 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10386 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10387 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10388 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10389 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10390 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10391 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10392 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10393 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10394 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10395 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10396 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10397 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [7,7]
10398 ; AVX1-NEXT: # xmm1 = mem[0,0]
10399 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
10400 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
10401 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10404 ; AVX2-LABEL: ugt_7_v4i64:
10406 ; AVX2-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]
10407 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10408 ; AVX2-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]
10409 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10410 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10411 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10412 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10413 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10414 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10415 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10416 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10417 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [7,7,7,7]
10418 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10421 ; AVX512VPOPCNTDQ-LABEL: ugt_7_v4i64:
10422 ; AVX512VPOPCNTDQ: # %bb.0:
10423 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10424 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10425 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [7,7,7,7]
10426 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10427 ; AVX512VPOPCNTDQ-NEXT: retq
10429 ; AVX512VPOPCNTDQVL-LABEL: ugt_7_v4i64:
10430 ; AVX512VPOPCNTDQVL: # %bb.0:
10431 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10432 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [7,7,7,7]
10433 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10434 ; AVX512VPOPCNTDQVL-NEXT: retq
10436 ; BITALG_NOVLX-LABEL: ugt_7_v4i64:
10437 ; BITALG_NOVLX: # %bb.0:
10438 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10439 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10440 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10441 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10442 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [7,7,7,7]
10443 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10444 ; BITALG_NOVLX-NEXT: retq
10446 ; BITALG-LABEL: ugt_7_v4i64:
10448 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10449 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10450 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10451 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [7,7,7,7]
10452 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10453 ; BITALG-NEXT: retq
10454 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10455 %3 = icmp ugt <4 x i64> %2, <i64 7, i64 7, i64 7, i64 7>
10456 %4 = sext <4 x i1> %3 to <4 x i64>
10460 define <4 x i64> @ult_8_v4i64(<4 x i64> %0) {
10461 ; AVX1-LABEL: ult_8_v4i64:
10463 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10464 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10465 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10466 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10467 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10468 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10469 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10470 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10471 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10472 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10473 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10474 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10475 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10476 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10477 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10478 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10479 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10480 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10481 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [8,8]
10482 ; AVX1-NEXT: # xmm1 = mem[0,0]
10483 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
10484 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
10485 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10488 ; AVX2-LABEL: ult_8_v4i64:
10490 ; AVX2-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]
10491 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10492 ; AVX2-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]
10493 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10494 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10495 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10496 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10497 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10498 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10499 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10500 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10501 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [8,8,8,8]
10502 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10505 ; AVX512VPOPCNTDQ-LABEL: ult_8_v4i64:
10506 ; AVX512VPOPCNTDQ: # %bb.0:
10507 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10508 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10509 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [8,8,8,8]
10510 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10511 ; AVX512VPOPCNTDQ-NEXT: retq
10513 ; AVX512VPOPCNTDQVL-LABEL: ult_8_v4i64:
10514 ; AVX512VPOPCNTDQVL: # %bb.0:
10515 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10516 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [8,8,8,8]
10517 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10518 ; AVX512VPOPCNTDQVL-NEXT: retq
10520 ; BITALG_NOVLX-LABEL: ult_8_v4i64:
10521 ; BITALG_NOVLX: # %bb.0:
10522 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10523 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10524 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10525 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10526 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [8,8,8,8]
10527 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10528 ; BITALG_NOVLX-NEXT: retq
10530 ; BITALG-LABEL: ult_8_v4i64:
10532 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10533 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10534 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10535 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [8,8,8,8]
10536 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10537 ; BITALG-NEXT: retq
10538 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10539 %3 = icmp ult <4 x i64> %2, <i64 8, i64 8, i64 8, i64 8>
10540 %4 = sext <4 x i1> %3 to <4 x i64>
10544 define <4 x i64> @ugt_8_v4i64(<4 x i64> %0) {
10545 ; AVX1-LABEL: ugt_8_v4i64:
10547 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10548 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10549 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10550 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10551 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10552 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10553 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10554 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10555 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10556 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10557 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10558 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10559 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10560 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10561 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10562 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10563 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10564 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10565 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [8,8]
10566 ; AVX1-NEXT: # xmm1 = mem[0,0]
10567 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
10568 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
10569 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10572 ; AVX2-LABEL: ugt_8_v4i64:
10574 ; AVX2-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]
10575 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10576 ; AVX2-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]
10577 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10578 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10579 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10580 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10581 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10582 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10583 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10584 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10585 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [8,8,8,8]
10586 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10589 ; AVX512VPOPCNTDQ-LABEL: ugt_8_v4i64:
10590 ; AVX512VPOPCNTDQ: # %bb.0:
10591 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10592 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10593 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [8,8,8,8]
10594 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10595 ; AVX512VPOPCNTDQ-NEXT: retq
10597 ; AVX512VPOPCNTDQVL-LABEL: ugt_8_v4i64:
10598 ; AVX512VPOPCNTDQVL: # %bb.0:
10599 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10600 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [8,8,8,8]
10601 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10602 ; AVX512VPOPCNTDQVL-NEXT: retq
10604 ; BITALG_NOVLX-LABEL: ugt_8_v4i64:
10605 ; BITALG_NOVLX: # %bb.0:
10606 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10607 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10608 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10609 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10610 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [8,8,8,8]
10611 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10612 ; BITALG_NOVLX-NEXT: retq
10614 ; BITALG-LABEL: ugt_8_v4i64:
10616 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10617 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10618 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10619 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [8,8,8,8]
10620 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10621 ; BITALG-NEXT: retq
10622 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10623 %3 = icmp ugt <4 x i64> %2, <i64 8, i64 8, i64 8, i64 8>
10624 %4 = sext <4 x i1> %3 to <4 x i64>
10628 define <4 x i64> @ult_9_v4i64(<4 x i64> %0) {
10629 ; AVX1-LABEL: ult_9_v4i64:
10631 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10632 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10633 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10634 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10635 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10636 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10637 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10638 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10639 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10640 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10641 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10642 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10643 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10644 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10645 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10646 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10647 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10648 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10649 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [9,9]
10650 ; AVX1-NEXT: # xmm1 = mem[0,0]
10651 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
10652 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
10653 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10656 ; AVX2-LABEL: ult_9_v4i64:
10658 ; AVX2-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]
10659 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10660 ; AVX2-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]
10661 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10662 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10663 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10664 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10665 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10666 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10667 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10668 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10669 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [9,9,9,9]
10670 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10673 ; AVX512VPOPCNTDQ-LABEL: ult_9_v4i64:
10674 ; AVX512VPOPCNTDQ: # %bb.0:
10675 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10676 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10677 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [9,9,9,9]
10678 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10679 ; AVX512VPOPCNTDQ-NEXT: retq
10681 ; AVX512VPOPCNTDQVL-LABEL: ult_9_v4i64:
10682 ; AVX512VPOPCNTDQVL: # %bb.0:
10683 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10684 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [9,9,9,9]
10685 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10686 ; AVX512VPOPCNTDQVL-NEXT: retq
10688 ; BITALG_NOVLX-LABEL: ult_9_v4i64:
10689 ; BITALG_NOVLX: # %bb.0:
10690 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10691 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10692 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10693 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10694 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [9,9,9,9]
10695 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10696 ; BITALG_NOVLX-NEXT: retq
10698 ; BITALG-LABEL: ult_9_v4i64:
10700 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10701 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10702 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10703 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [9,9,9,9]
10704 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10705 ; BITALG-NEXT: retq
10706 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10707 %3 = icmp ult <4 x i64> %2, <i64 9, i64 9, i64 9, i64 9>
10708 %4 = sext <4 x i1> %3 to <4 x i64>
10712 define <4 x i64> @ugt_9_v4i64(<4 x i64> %0) {
10713 ; AVX1-LABEL: ugt_9_v4i64:
10715 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10716 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10717 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10718 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10719 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10720 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10721 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10722 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10723 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10724 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10725 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10726 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10727 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10728 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10729 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10730 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10731 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10732 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10733 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [9,9]
10734 ; AVX1-NEXT: # xmm1 = mem[0,0]
10735 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
10736 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
10737 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10740 ; AVX2-LABEL: ugt_9_v4i64:
10742 ; AVX2-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]
10743 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10744 ; AVX2-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]
10745 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10746 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10747 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10748 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10749 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10750 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10751 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10752 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10753 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [9,9,9,9]
10754 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10757 ; AVX512VPOPCNTDQ-LABEL: ugt_9_v4i64:
10758 ; AVX512VPOPCNTDQ: # %bb.0:
10759 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10760 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10761 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [9,9,9,9]
10762 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10763 ; AVX512VPOPCNTDQ-NEXT: retq
10765 ; AVX512VPOPCNTDQVL-LABEL: ugt_9_v4i64:
10766 ; AVX512VPOPCNTDQVL: # %bb.0:
10767 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10768 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [9,9,9,9]
10769 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10770 ; AVX512VPOPCNTDQVL-NEXT: retq
10772 ; BITALG_NOVLX-LABEL: ugt_9_v4i64:
10773 ; BITALG_NOVLX: # %bb.0:
10774 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10775 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10776 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10777 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10778 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [9,9,9,9]
10779 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10780 ; BITALG_NOVLX-NEXT: retq
10782 ; BITALG-LABEL: ugt_9_v4i64:
10784 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10785 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10786 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10787 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [9,9,9,9]
10788 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10789 ; BITALG-NEXT: retq
10790 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10791 %3 = icmp ugt <4 x i64> %2, <i64 9, i64 9, i64 9, i64 9>
10792 %4 = sext <4 x i1> %3 to <4 x i64>
10796 define <4 x i64> @ult_10_v4i64(<4 x i64> %0) {
10797 ; AVX1-LABEL: ult_10_v4i64:
10799 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10800 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10801 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10802 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10803 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10804 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10805 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10806 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10807 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10808 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10809 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10810 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10811 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10812 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10813 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10814 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10815 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10816 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10817 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [10,10]
10818 ; AVX1-NEXT: # xmm1 = mem[0,0]
10819 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
10820 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
10821 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10824 ; AVX2-LABEL: ult_10_v4i64:
10826 ; AVX2-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]
10827 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10828 ; AVX2-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]
10829 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10830 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10831 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10832 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10833 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10834 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10835 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10836 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10837 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [10,10,10,10]
10838 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10841 ; AVX512VPOPCNTDQ-LABEL: ult_10_v4i64:
10842 ; AVX512VPOPCNTDQ: # %bb.0:
10843 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10844 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10845 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [10,10,10,10]
10846 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10847 ; AVX512VPOPCNTDQ-NEXT: retq
10849 ; AVX512VPOPCNTDQVL-LABEL: ult_10_v4i64:
10850 ; AVX512VPOPCNTDQVL: # %bb.0:
10851 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10852 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [10,10,10,10]
10853 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10854 ; AVX512VPOPCNTDQVL-NEXT: retq
10856 ; BITALG_NOVLX-LABEL: ult_10_v4i64:
10857 ; BITALG_NOVLX: # %bb.0:
10858 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10859 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10860 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10861 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10862 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [10,10,10,10]
10863 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10864 ; BITALG_NOVLX-NEXT: retq
10866 ; BITALG-LABEL: ult_10_v4i64:
10868 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10869 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10870 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10871 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [10,10,10,10]
10872 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
10873 ; BITALG-NEXT: retq
10874 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10875 %3 = icmp ult <4 x i64> %2, <i64 10, i64 10, i64 10, i64 10>
10876 %4 = sext <4 x i1> %3 to <4 x i64>
10880 define <4 x i64> @ugt_10_v4i64(<4 x i64> %0) {
10881 ; AVX1-LABEL: ugt_10_v4i64:
10883 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10884 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10885 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10886 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10887 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10888 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10889 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10890 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10891 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10892 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10893 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10894 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10895 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10896 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10897 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10898 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10899 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10900 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10901 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [10,10]
10902 ; AVX1-NEXT: # xmm1 = mem[0,0]
10903 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
10904 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
10905 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10908 ; AVX2-LABEL: ugt_10_v4i64:
10910 ; AVX2-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]
10911 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10912 ; AVX2-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]
10913 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10914 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10915 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
10916 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
10917 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
10918 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
10919 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
10920 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10921 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [10,10,10,10]
10922 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10925 ; AVX512VPOPCNTDQ-LABEL: ugt_10_v4i64:
10926 ; AVX512VPOPCNTDQ: # %bb.0:
10927 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10928 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10929 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [10,10,10,10]
10930 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10931 ; AVX512VPOPCNTDQ-NEXT: retq
10933 ; AVX512VPOPCNTDQVL-LABEL: ugt_10_v4i64:
10934 ; AVX512VPOPCNTDQVL: # %bb.0:
10935 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
10936 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [10,10,10,10]
10937 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10938 ; AVX512VPOPCNTDQVL-NEXT: retq
10940 ; BITALG_NOVLX-LABEL: ugt_10_v4i64:
10941 ; BITALG_NOVLX: # %bb.0:
10942 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
10943 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
10944 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
10945 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10946 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [10,10,10,10]
10947 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10948 ; BITALG_NOVLX-NEXT: retq
10950 ; BITALG-LABEL: ugt_10_v4i64:
10952 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
10953 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10954 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
10955 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [10,10,10,10]
10956 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
10957 ; BITALG-NEXT: retq
10958 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
10959 %3 = icmp ugt <4 x i64> %2, <i64 10, i64 10, i64 10, i64 10>
10960 %4 = sext <4 x i1> %3 to <4 x i64>
10964 define <4 x i64> @ult_11_v4i64(<4 x i64> %0) {
10965 ; AVX1-LABEL: ult_11_v4i64:
10967 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10968 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
10969 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10970 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
10971 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
10972 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
10973 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
10974 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
10975 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
10976 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
10977 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
10978 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
10979 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
10980 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
10981 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
10982 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
10983 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
10984 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
10985 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [11,11]
10986 ; AVX1-NEXT: # xmm1 = mem[0,0]
10987 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
10988 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
10989 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
10992 ; AVX2-LABEL: ult_11_v4i64:
10994 ; AVX2-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]
10995 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
10996 ; AVX2-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]
10997 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
10998 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
10999 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11000 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11001 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11002 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11003 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11004 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11005 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [11,11,11,11]
11006 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11009 ; AVX512VPOPCNTDQ-LABEL: ult_11_v4i64:
11010 ; AVX512VPOPCNTDQ: # %bb.0:
11011 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11012 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11013 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [11,11,11,11]
11014 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11015 ; AVX512VPOPCNTDQ-NEXT: retq
11017 ; AVX512VPOPCNTDQVL-LABEL: ult_11_v4i64:
11018 ; AVX512VPOPCNTDQVL: # %bb.0:
11019 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11020 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [11,11,11,11]
11021 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11022 ; AVX512VPOPCNTDQVL-NEXT: retq
11024 ; BITALG_NOVLX-LABEL: ult_11_v4i64:
11025 ; BITALG_NOVLX: # %bb.0:
11026 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11027 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11028 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11029 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11030 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [11,11,11,11]
11031 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11032 ; BITALG_NOVLX-NEXT: retq
11034 ; BITALG-LABEL: ult_11_v4i64:
11036 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11037 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11038 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11039 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [11,11,11,11]
11040 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11041 ; BITALG-NEXT: retq
11042 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11043 %3 = icmp ult <4 x i64> %2, <i64 11, i64 11, i64 11, i64 11>
11044 %4 = sext <4 x i1> %3 to <4 x i64>
11048 define <4 x i64> @ugt_11_v4i64(<4 x i64> %0) {
11049 ; AVX1-LABEL: ugt_11_v4i64:
11051 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11052 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11053 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11054 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11055 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11056 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11057 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11058 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11059 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11060 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11061 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11062 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11063 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11064 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11065 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11066 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11067 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11068 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11069 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [11,11]
11070 ; AVX1-NEXT: # xmm1 = mem[0,0]
11071 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
11072 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
11073 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11076 ; AVX2-LABEL: ugt_11_v4i64:
11078 ; AVX2-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]
11079 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11080 ; AVX2-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]
11081 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11082 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11083 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11084 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11085 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11086 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11087 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11088 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11089 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [11,11,11,11]
11090 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11093 ; AVX512VPOPCNTDQ-LABEL: ugt_11_v4i64:
11094 ; AVX512VPOPCNTDQ: # %bb.0:
11095 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11096 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11097 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [11,11,11,11]
11098 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11099 ; AVX512VPOPCNTDQ-NEXT: retq
11101 ; AVX512VPOPCNTDQVL-LABEL: ugt_11_v4i64:
11102 ; AVX512VPOPCNTDQVL: # %bb.0:
11103 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11104 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [11,11,11,11]
11105 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11106 ; AVX512VPOPCNTDQVL-NEXT: retq
11108 ; BITALG_NOVLX-LABEL: ugt_11_v4i64:
11109 ; BITALG_NOVLX: # %bb.0:
11110 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11111 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11112 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11113 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11114 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [11,11,11,11]
11115 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11116 ; BITALG_NOVLX-NEXT: retq
11118 ; BITALG-LABEL: ugt_11_v4i64:
11120 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11121 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11122 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11123 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [11,11,11,11]
11124 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11125 ; BITALG-NEXT: retq
11126 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11127 %3 = icmp ugt <4 x i64> %2, <i64 11, i64 11, i64 11, i64 11>
11128 %4 = sext <4 x i1> %3 to <4 x i64>
11132 define <4 x i64> @ult_12_v4i64(<4 x i64> %0) {
11133 ; AVX1-LABEL: ult_12_v4i64:
11135 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11136 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11137 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11138 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11139 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11140 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11141 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11142 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11143 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11144 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11145 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11146 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11147 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11148 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11149 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11150 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11151 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11152 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11153 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [12,12]
11154 ; AVX1-NEXT: # xmm1 = mem[0,0]
11155 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
11156 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
11157 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11160 ; AVX2-LABEL: ult_12_v4i64:
11162 ; AVX2-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]
11163 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11164 ; AVX2-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]
11165 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11166 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11167 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11168 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11169 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11170 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11171 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11172 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11173 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [12,12,12,12]
11174 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11177 ; AVX512VPOPCNTDQ-LABEL: ult_12_v4i64:
11178 ; AVX512VPOPCNTDQ: # %bb.0:
11179 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11180 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11181 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [12,12,12,12]
11182 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11183 ; AVX512VPOPCNTDQ-NEXT: retq
11185 ; AVX512VPOPCNTDQVL-LABEL: ult_12_v4i64:
11186 ; AVX512VPOPCNTDQVL: # %bb.0:
11187 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11188 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [12,12,12,12]
11189 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11190 ; AVX512VPOPCNTDQVL-NEXT: retq
11192 ; BITALG_NOVLX-LABEL: ult_12_v4i64:
11193 ; BITALG_NOVLX: # %bb.0:
11194 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11195 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11196 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11197 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11198 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [12,12,12,12]
11199 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11200 ; BITALG_NOVLX-NEXT: retq
11202 ; BITALG-LABEL: ult_12_v4i64:
11204 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11205 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11206 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11207 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [12,12,12,12]
11208 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11209 ; BITALG-NEXT: retq
11210 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11211 %3 = icmp ult <4 x i64> %2, <i64 12, i64 12, i64 12, i64 12>
11212 %4 = sext <4 x i1> %3 to <4 x i64>
11216 define <4 x i64> @ugt_12_v4i64(<4 x i64> %0) {
11217 ; AVX1-LABEL: ugt_12_v4i64:
11219 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11220 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11221 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11222 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11223 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11224 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11225 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11226 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11227 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11228 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11229 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11230 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11231 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11232 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11233 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11234 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11235 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11236 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11237 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [12,12]
11238 ; AVX1-NEXT: # xmm1 = mem[0,0]
11239 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
11240 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
11241 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11244 ; AVX2-LABEL: ugt_12_v4i64:
11246 ; AVX2-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]
11247 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11248 ; AVX2-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]
11249 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11250 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11251 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11252 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11253 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11254 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11255 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11256 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11257 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [12,12,12,12]
11258 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11261 ; AVX512VPOPCNTDQ-LABEL: ugt_12_v4i64:
11262 ; AVX512VPOPCNTDQ: # %bb.0:
11263 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11264 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11265 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [12,12,12,12]
11266 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11267 ; AVX512VPOPCNTDQ-NEXT: retq
11269 ; AVX512VPOPCNTDQVL-LABEL: ugt_12_v4i64:
11270 ; AVX512VPOPCNTDQVL: # %bb.0:
11271 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11272 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [12,12,12,12]
11273 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11274 ; AVX512VPOPCNTDQVL-NEXT: retq
11276 ; BITALG_NOVLX-LABEL: ugt_12_v4i64:
11277 ; BITALG_NOVLX: # %bb.0:
11278 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11279 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11280 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11281 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11282 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [12,12,12,12]
11283 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11284 ; BITALG_NOVLX-NEXT: retq
11286 ; BITALG-LABEL: ugt_12_v4i64:
11288 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11289 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11290 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11291 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [12,12,12,12]
11292 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11293 ; BITALG-NEXT: retq
11294 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11295 %3 = icmp ugt <4 x i64> %2, <i64 12, i64 12, i64 12, i64 12>
11296 %4 = sext <4 x i1> %3 to <4 x i64>
11300 define <4 x i64> @ult_13_v4i64(<4 x i64> %0) {
11301 ; AVX1-LABEL: ult_13_v4i64:
11303 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11304 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11305 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11306 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11307 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11308 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11309 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11310 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11311 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11312 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11313 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11314 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11315 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11316 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11317 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11318 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11319 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11320 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11321 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [13,13]
11322 ; AVX1-NEXT: # xmm1 = mem[0,0]
11323 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
11324 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
11325 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11328 ; AVX2-LABEL: ult_13_v4i64:
11330 ; AVX2-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]
11331 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11332 ; AVX2-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]
11333 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11334 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11335 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11336 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11337 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11338 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11339 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11340 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11341 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [13,13,13,13]
11342 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11345 ; AVX512VPOPCNTDQ-LABEL: ult_13_v4i64:
11346 ; AVX512VPOPCNTDQ: # %bb.0:
11347 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11348 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11349 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [13,13,13,13]
11350 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11351 ; AVX512VPOPCNTDQ-NEXT: retq
11353 ; AVX512VPOPCNTDQVL-LABEL: ult_13_v4i64:
11354 ; AVX512VPOPCNTDQVL: # %bb.0:
11355 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11356 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [13,13,13,13]
11357 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11358 ; AVX512VPOPCNTDQVL-NEXT: retq
11360 ; BITALG_NOVLX-LABEL: ult_13_v4i64:
11361 ; BITALG_NOVLX: # %bb.0:
11362 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11363 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11364 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11365 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11366 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [13,13,13,13]
11367 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11368 ; BITALG_NOVLX-NEXT: retq
11370 ; BITALG-LABEL: ult_13_v4i64:
11372 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11373 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11374 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11375 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [13,13,13,13]
11376 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11377 ; BITALG-NEXT: retq
11378 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11379 %3 = icmp ult <4 x i64> %2, <i64 13, i64 13, i64 13, i64 13>
11380 %4 = sext <4 x i1> %3 to <4 x i64>
11384 define <4 x i64> @ugt_13_v4i64(<4 x i64> %0) {
11385 ; AVX1-LABEL: ugt_13_v4i64:
11387 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11388 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11389 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11390 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11391 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11392 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11393 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11394 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11395 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11396 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11397 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11398 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11399 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11400 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11401 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11402 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11403 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11404 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11405 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [13,13]
11406 ; AVX1-NEXT: # xmm1 = mem[0,0]
11407 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
11408 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
11409 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11412 ; AVX2-LABEL: ugt_13_v4i64:
11414 ; AVX2-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]
11415 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11416 ; AVX2-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]
11417 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11418 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11419 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11420 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11421 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11422 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11423 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11424 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11425 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [13,13,13,13]
11426 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11429 ; AVX512VPOPCNTDQ-LABEL: ugt_13_v4i64:
11430 ; AVX512VPOPCNTDQ: # %bb.0:
11431 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11432 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11433 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [13,13,13,13]
11434 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11435 ; AVX512VPOPCNTDQ-NEXT: retq
11437 ; AVX512VPOPCNTDQVL-LABEL: ugt_13_v4i64:
11438 ; AVX512VPOPCNTDQVL: # %bb.0:
11439 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11440 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [13,13,13,13]
11441 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11442 ; AVX512VPOPCNTDQVL-NEXT: retq
11444 ; BITALG_NOVLX-LABEL: ugt_13_v4i64:
11445 ; BITALG_NOVLX: # %bb.0:
11446 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11447 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11448 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11449 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11450 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [13,13,13,13]
11451 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11452 ; BITALG_NOVLX-NEXT: retq
11454 ; BITALG-LABEL: ugt_13_v4i64:
11456 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11457 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11458 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11459 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [13,13,13,13]
11460 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11461 ; BITALG-NEXT: retq
11462 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11463 %3 = icmp ugt <4 x i64> %2, <i64 13, i64 13, i64 13, i64 13>
11464 %4 = sext <4 x i1> %3 to <4 x i64>
11468 define <4 x i64> @ult_14_v4i64(<4 x i64> %0) {
11469 ; AVX1-LABEL: ult_14_v4i64:
11471 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11472 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11473 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11474 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11475 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11476 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11477 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11478 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11479 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11480 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11481 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11482 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11483 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11484 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11485 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11486 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11487 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11488 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11489 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [14,14]
11490 ; AVX1-NEXT: # xmm1 = mem[0,0]
11491 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
11492 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
11493 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11496 ; AVX2-LABEL: ult_14_v4i64:
11498 ; AVX2-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]
11499 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11500 ; AVX2-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]
11501 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11502 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11503 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11504 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11505 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11506 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11507 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11508 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11509 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [14,14,14,14]
11510 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11513 ; AVX512VPOPCNTDQ-LABEL: ult_14_v4i64:
11514 ; AVX512VPOPCNTDQ: # %bb.0:
11515 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11516 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11517 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [14,14,14,14]
11518 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11519 ; AVX512VPOPCNTDQ-NEXT: retq
11521 ; AVX512VPOPCNTDQVL-LABEL: ult_14_v4i64:
11522 ; AVX512VPOPCNTDQVL: # %bb.0:
11523 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11524 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [14,14,14,14]
11525 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11526 ; AVX512VPOPCNTDQVL-NEXT: retq
11528 ; BITALG_NOVLX-LABEL: ult_14_v4i64:
11529 ; BITALG_NOVLX: # %bb.0:
11530 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11531 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11532 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11533 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11534 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [14,14,14,14]
11535 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11536 ; BITALG_NOVLX-NEXT: retq
11538 ; BITALG-LABEL: ult_14_v4i64:
11540 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11541 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11542 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11543 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [14,14,14,14]
11544 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11545 ; BITALG-NEXT: retq
11546 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11547 %3 = icmp ult <4 x i64> %2, <i64 14, i64 14, i64 14, i64 14>
11548 %4 = sext <4 x i1> %3 to <4 x i64>
11552 define <4 x i64> @ugt_14_v4i64(<4 x i64> %0) {
11553 ; AVX1-LABEL: ugt_14_v4i64:
11555 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11556 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11557 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11558 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11559 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11560 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11561 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11562 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11563 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11564 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11565 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11566 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11567 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11568 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11569 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11570 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11571 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11572 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11573 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [14,14]
11574 ; AVX1-NEXT: # xmm1 = mem[0,0]
11575 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
11576 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
11577 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11580 ; AVX2-LABEL: ugt_14_v4i64:
11582 ; AVX2-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]
11583 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11584 ; AVX2-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]
11585 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11586 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11587 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11588 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11589 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11590 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11591 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11592 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11593 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [14,14,14,14]
11594 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11597 ; AVX512VPOPCNTDQ-LABEL: ugt_14_v4i64:
11598 ; AVX512VPOPCNTDQ: # %bb.0:
11599 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11600 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11601 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [14,14,14,14]
11602 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11603 ; AVX512VPOPCNTDQ-NEXT: retq
11605 ; AVX512VPOPCNTDQVL-LABEL: ugt_14_v4i64:
11606 ; AVX512VPOPCNTDQVL: # %bb.0:
11607 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11608 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [14,14,14,14]
11609 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11610 ; AVX512VPOPCNTDQVL-NEXT: retq
11612 ; BITALG_NOVLX-LABEL: ugt_14_v4i64:
11613 ; BITALG_NOVLX: # %bb.0:
11614 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11615 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11616 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11617 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11618 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [14,14,14,14]
11619 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11620 ; BITALG_NOVLX-NEXT: retq
11622 ; BITALG-LABEL: ugt_14_v4i64:
11624 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11625 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11626 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11627 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [14,14,14,14]
11628 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11629 ; BITALG-NEXT: retq
11630 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11631 %3 = icmp ugt <4 x i64> %2, <i64 14, i64 14, i64 14, i64 14>
11632 %4 = sext <4 x i1> %3 to <4 x i64>
11636 define <4 x i64> @ult_15_v4i64(<4 x i64> %0) {
11637 ; AVX1-LABEL: ult_15_v4i64:
11639 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11640 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11641 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11642 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11643 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11644 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11645 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11646 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11647 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11648 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11649 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11650 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11651 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11652 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11653 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11654 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11655 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11656 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11657 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [15,15]
11658 ; AVX1-NEXT: # xmm1 = mem[0,0]
11659 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
11660 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
11661 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11664 ; AVX2-LABEL: ult_15_v4i64:
11666 ; AVX2-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]
11667 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11668 ; AVX2-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]
11669 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11670 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11671 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11672 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11673 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11674 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11675 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11676 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11677 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [15,15,15,15]
11678 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11681 ; AVX512VPOPCNTDQ-LABEL: ult_15_v4i64:
11682 ; AVX512VPOPCNTDQ: # %bb.0:
11683 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11684 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11685 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [15,15,15,15]
11686 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11687 ; AVX512VPOPCNTDQ-NEXT: retq
11689 ; AVX512VPOPCNTDQVL-LABEL: ult_15_v4i64:
11690 ; AVX512VPOPCNTDQVL: # %bb.0:
11691 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11692 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [15,15,15,15]
11693 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11694 ; AVX512VPOPCNTDQVL-NEXT: retq
11696 ; BITALG_NOVLX-LABEL: ult_15_v4i64:
11697 ; BITALG_NOVLX: # %bb.0:
11698 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11699 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11700 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11701 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11702 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [15,15,15,15]
11703 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11704 ; BITALG_NOVLX-NEXT: retq
11706 ; BITALG-LABEL: ult_15_v4i64:
11708 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11709 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11710 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11711 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [15,15,15,15]
11712 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11713 ; BITALG-NEXT: retq
11714 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11715 %3 = icmp ult <4 x i64> %2, <i64 15, i64 15, i64 15, i64 15>
11716 %4 = sext <4 x i1> %3 to <4 x i64>
11720 define <4 x i64> @ugt_15_v4i64(<4 x i64> %0) {
11721 ; AVX1-LABEL: ugt_15_v4i64:
11723 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11724 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11725 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11726 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11727 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11728 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11729 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11730 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11731 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11732 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11733 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11734 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11735 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11736 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11737 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11738 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11739 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11740 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11741 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [15,15]
11742 ; AVX1-NEXT: # xmm1 = mem[0,0]
11743 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
11744 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
11745 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11748 ; AVX2-LABEL: ugt_15_v4i64:
11750 ; AVX2-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]
11751 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11752 ; AVX2-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]
11753 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11754 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11755 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11756 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11757 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11758 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11759 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11760 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11761 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [15,15,15,15]
11762 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11765 ; AVX512VPOPCNTDQ-LABEL: ugt_15_v4i64:
11766 ; AVX512VPOPCNTDQ: # %bb.0:
11767 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11768 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11769 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [15,15,15,15]
11770 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11771 ; AVX512VPOPCNTDQ-NEXT: retq
11773 ; AVX512VPOPCNTDQVL-LABEL: ugt_15_v4i64:
11774 ; AVX512VPOPCNTDQVL: # %bb.0:
11775 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11776 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [15,15,15,15]
11777 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11778 ; AVX512VPOPCNTDQVL-NEXT: retq
11780 ; BITALG_NOVLX-LABEL: ugt_15_v4i64:
11781 ; BITALG_NOVLX: # %bb.0:
11782 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11783 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11784 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11785 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11786 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [15,15,15,15]
11787 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11788 ; BITALG_NOVLX-NEXT: retq
11790 ; BITALG-LABEL: ugt_15_v4i64:
11792 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11793 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11794 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11795 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [15,15,15,15]
11796 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11797 ; BITALG-NEXT: retq
11798 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11799 %3 = icmp ugt <4 x i64> %2, <i64 15, i64 15, i64 15, i64 15>
11800 %4 = sext <4 x i1> %3 to <4 x i64>
11804 define <4 x i64> @ult_16_v4i64(<4 x i64> %0) {
11805 ; AVX1-LABEL: ult_16_v4i64:
11807 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11808 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11809 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11810 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11811 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11812 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11813 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11814 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11815 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11816 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11817 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11818 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11819 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11820 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11821 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11822 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11823 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11824 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11825 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [16,16]
11826 ; AVX1-NEXT: # xmm1 = mem[0,0]
11827 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
11828 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
11829 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11832 ; AVX2-LABEL: ult_16_v4i64:
11834 ; AVX2-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]
11835 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11836 ; AVX2-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]
11837 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11838 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11839 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11840 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11841 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11842 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11843 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11844 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11845 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [16,16,16,16]
11846 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11849 ; AVX512VPOPCNTDQ-LABEL: ult_16_v4i64:
11850 ; AVX512VPOPCNTDQ: # %bb.0:
11851 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11852 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11853 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [16,16,16,16]
11854 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11855 ; AVX512VPOPCNTDQ-NEXT: retq
11857 ; AVX512VPOPCNTDQVL-LABEL: ult_16_v4i64:
11858 ; AVX512VPOPCNTDQVL: # %bb.0:
11859 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11860 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [16,16,16,16]
11861 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11862 ; AVX512VPOPCNTDQVL-NEXT: retq
11864 ; BITALG_NOVLX-LABEL: ult_16_v4i64:
11865 ; BITALG_NOVLX: # %bb.0:
11866 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11867 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11868 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11869 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11870 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [16,16,16,16]
11871 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11872 ; BITALG_NOVLX-NEXT: retq
11874 ; BITALG-LABEL: ult_16_v4i64:
11876 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11877 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11878 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11879 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [16,16,16,16]
11880 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
11881 ; BITALG-NEXT: retq
11882 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11883 %3 = icmp ult <4 x i64> %2, <i64 16, i64 16, i64 16, i64 16>
11884 %4 = sext <4 x i1> %3 to <4 x i64>
11888 define <4 x i64> @ugt_16_v4i64(<4 x i64> %0) {
11889 ; AVX1-LABEL: ugt_16_v4i64:
11891 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11892 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11893 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11894 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11895 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11896 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11897 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11898 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11899 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11900 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11901 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11902 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11903 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11904 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11905 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11906 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11907 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11908 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11909 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [16,16]
11910 ; AVX1-NEXT: # xmm1 = mem[0,0]
11911 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
11912 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
11913 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
11916 ; AVX2-LABEL: ugt_16_v4i64:
11918 ; AVX2-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]
11919 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
11920 ; AVX2-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]
11921 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
11922 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
11923 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
11924 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
11925 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
11926 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
11927 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
11928 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11929 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [16,16,16,16]
11930 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11933 ; AVX512VPOPCNTDQ-LABEL: ugt_16_v4i64:
11934 ; AVX512VPOPCNTDQ: # %bb.0:
11935 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11936 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11937 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [16,16,16,16]
11938 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11939 ; AVX512VPOPCNTDQ-NEXT: retq
11941 ; AVX512VPOPCNTDQVL-LABEL: ugt_16_v4i64:
11942 ; AVX512VPOPCNTDQVL: # %bb.0:
11943 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
11944 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [16,16,16,16]
11945 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11946 ; AVX512VPOPCNTDQVL-NEXT: retq
11948 ; BITALG_NOVLX-LABEL: ugt_16_v4i64:
11949 ; BITALG_NOVLX: # %bb.0:
11950 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
11951 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
11952 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
11953 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11954 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [16,16,16,16]
11955 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11956 ; BITALG_NOVLX-NEXT: retq
11958 ; BITALG-LABEL: ugt_16_v4i64:
11960 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
11961 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11962 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
11963 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [16,16,16,16]
11964 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
11965 ; BITALG-NEXT: retq
11966 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
11967 %3 = icmp ugt <4 x i64> %2, <i64 16, i64 16, i64 16, i64 16>
11968 %4 = sext <4 x i1> %3 to <4 x i64>
11972 define <4 x i64> @ult_17_v4i64(<4 x i64> %0) {
11973 ; AVX1-LABEL: ult_17_v4i64:
11975 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11976 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
11977 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11978 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
11979 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
11980 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
11981 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
11982 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
11983 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
11984 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
11985 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
11986 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
11987 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
11988 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
11989 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
11990 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
11991 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
11992 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
11993 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [17,17]
11994 ; AVX1-NEXT: # xmm1 = mem[0,0]
11995 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
11996 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
11997 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12000 ; AVX2-LABEL: ult_17_v4i64:
12002 ; AVX2-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]
12003 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12004 ; AVX2-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]
12005 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12006 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12007 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12008 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12009 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12010 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12011 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12012 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12013 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [17,17,17,17]
12014 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12017 ; AVX512VPOPCNTDQ-LABEL: ult_17_v4i64:
12018 ; AVX512VPOPCNTDQ: # %bb.0:
12019 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12020 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12021 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [17,17,17,17]
12022 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12023 ; AVX512VPOPCNTDQ-NEXT: retq
12025 ; AVX512VPOPCNTDQVL-LABEL: ult_17_v4i64:
12026 ; AVX512VPOPCNTDQVL: # %bb.0:
12027 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12028 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [17,17,17,17]
12029 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12030 ; AVX512VPOPCNTDQVL-NEXT: retq
12032 ; BITALG_NOVLX-LABEL: ult_17_v4i64:
12033 ; BITALG_NOVLX: # %bb.0:
12034 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12035 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12036 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12037 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12038 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [17,17,17,17]
12039 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12040 ; BITALG_NOVLX-NEXT: retq
12042 ; BITALG-LABEL: ult_17_v4i64:
12044 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12045 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12046 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12047 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [17,17,17,17]
12048 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12049 ; BITALG-NEXT: retq
12050 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12051 %3 = icmp ult <4 x i64> %2, <i64 17, i64 17, i64 17, i64 17>
12052 %4 = sext <4 x i1> %3 to <4 x i64>
12056 define <4 x i64> @ugt_17_v4i64(<4 x i64> %0) {
12057 ; AVX1-LABEL: ugt_17_v4i64:
12059 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12060 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12061 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12062 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12063 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12064 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12065 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12066 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12067 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12068 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12069 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12070 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12071 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12072 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12073 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12074 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12075 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12076 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12077 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [17,17]
12078 ; AVX1-NEXT: # xmm1 = mem[0,0]
12079 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
12080 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
12081 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12084 ; AVX2-LABEL: ugt_17_v4i64:
12086 ; AVX2-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]
12087 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12088 ; AVX2-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]
12089 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12090 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12091 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12092 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12093 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12094 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12095 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12096 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12097 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [17,17,17,17]
12098 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12101 ; AVX512VPOPCNTDQ-LABEL: ugt_17_v4i64:
12102 ; AVX512VPOPCNTDQ: # %bb.0:
12103 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12104 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12105 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [17,17,17,17]
12106 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12107 ; AVX512VPOPCNTDQ-NEXT: retq
12109 ; AVX512VPOPCNTDQVL-LABEL: ugt_17_v4i64:
12110 ; AVX512VPOPCNTDQVL: # %bb.0:
12111 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12112 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [17,17,17,17]
12113 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12114 ; AVX512VPOPCNTDQVL-NEXT: retq
12116 ; BITALG_NOVLX-LABEL: ugt_17_v4i64:
12117 ; BITALG_NOVLX: # %bb.0:
12118 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12119 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12120 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12121 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12122 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [17,17,17,17]
12123 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12124 ; BITALG_NOVLX-NEXT: retq
12126 ; BITALG-LABEL: ugt_17_v4i64:
12128 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12129 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12130 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12131 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [17,17,17,17]
12132 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12133 ; BITALG-NEXT: retq
12134 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12135 %3 = icmp ugt <4 x i64> %2, <i64 17, i64 17, i64 17, i64 17>
12136 %4 = sext <4 x i1> %3 to <4 x i64>
12140 define <4 x i64> @ult_18_v4i64(<4 x i64> %0) {
12141 ; AVX1-LABEL: ult_18_v4i64:
12143 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12144 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12145 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12146 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12147 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12148 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12149 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12150 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12151 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12152 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12153 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12154 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12155 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12156 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12157 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12158 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12159 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12160 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12161 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [18,18]
12162 ; AVX1-NEXT: # xmm1 = mem[0,0]
12163 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
12164 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
12165 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12168 ; AVX2-LABEL: ult_18_v4i64:
12170 ; AVX2-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]
12171 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12172 ; AVX2-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]
12173 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12174 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12175 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12176 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12177 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12178 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12179 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12180 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12181 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [18,18,18,18]
12182 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12185 ; AVX512VPOPCNTDQ-LABEL: ult_18_v4i64:
12186 ; AVX512VPOPCNTDQ: # %bb.0:
12187 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12188 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12189 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [18,18,18,18]
12190 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12191 ; AVX512VPOPCNTDQ-NEXT: retq
12193 ; AVX512VPOPCNTDQVL-LABEL: ult_18_v4i64:
12194 ; AVX512VPOPCNTDQVL: # %bb.0:
12195 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12196 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [18,18,18,18]
12197 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12198 ; AVX512VPOPCNTDQVL-NEXT: retq
12200 ; BITALG_NOVLX-LABEL: ult_18_v4i64:
12201 ; BITALG_NOVLX: # %bb.0:
12202 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12203 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12204 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12205 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12206 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [18,18,18,18]
12207 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12208 ; BITALG_NOVLX-NEXT: retq
12210 ; BITALG-LABEL: ult_18_v4i64:
12212 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12213 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12214 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12215 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [18,18,18,18]
12216 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12217 ; BITALG-NEXT: retq
12218 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12219 %3 = icmp ult <4 x i64> %2, <i64 18, i64 18, i64 18, i64 18>
12220 %4 = sext <4 x i1> %3 to <4 x i64>
12224 define <4 x i64> @ugt_18_v4i64(<4 x i64> %0) {
12225 ; AVX1-LABEL: ugt_18_v4i64:
12227 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12228 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12229 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12230 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12231 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12232 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12233 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12234 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12235 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12236 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12237 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12238 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12239 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12240 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12241 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12242 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12243 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12244 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12245 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [18,18]
12246 ; AVX1-NEXT: # xmm1 = mem[0,0]
12247 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
12248 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
12249 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12252 ; AVX2-LABEL: ugt_18_v4i64:
12254 ; AVX2-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]
12255 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12256 ; AVX2-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]
12257 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12258 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12259 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12260 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12261 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12262 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12263 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12264 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12265 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [18,18,18,18]
12266 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12269 ; AVX512VPOPCNTDQ-LABEL: ugt_18_v4i64:
12270 ; AVX512VPOPCNTDQ: # %bb.0:
12271 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12272 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12273 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [18,18,18,18]
12274 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12275 ; AVX512VPOPCNTDQ-NEXT: retq
12277 ; AVX512VPOPCNTDQVL-LABEL: ugt_18_v4i64:
12278 ; AVX512VPOPCNTDQVL: # %bb.0:
12279 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12280 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [18,18,18,18]
12281 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12282 ; AVX512VPOPCNTDQVL-NEXT: retq
12284 ; BITALG_NOVLX-LABEL: ugt_18_v4i64:
12285 ; BITALG_NOVLX: # %bb.0:
12286 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12287 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12288 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12289 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12290 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [18,18,18,18]
12291 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12292 ; BITALG_NOVLX-NEXT: retq
12294 ; BITALG-LABEL: ugt_18_v4i64:
12296 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12297 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12298 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12299 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [18,18,18,18]
12300 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12301 ; BITALG-NEXT: retq
12302 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12303 %3 = icmp ugt <4 x i64> %2, <i64 18, i64 18, i64 18, i64 18>
12304 %4 = sext <4 x i1> %3 to <4 x i64>
12308 define <4 x i64> @ult_19_v4i64(<4 x i64> %0) {
12309 ; AVX1-LABEL: ult_19_v4i64:
12311 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12312 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12313 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12314 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12315 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12316 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12317 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12318 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12319 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12320 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12321 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12322 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12323 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12324 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12325 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12326 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12327 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12328 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12329 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [19,19]
12330 ; AVX1-NEXT: # xmm1 = mem[0,0]
12331 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
12332 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
12333 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12336 ; AVX2-LABEL: ult_19_v4i64:
12338 ; AVX2-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]
12339 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12340 ; AVX2-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]
12341 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12342 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12343 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12344 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12345 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12346 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12347 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12348 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12349 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [19,19,19,19]
12350 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12353 ; AVX512VPOPCNTDQ-LABEL: ult_19_v4i64:
12354 ; AVX512VPOPCNTDQ: # %bb.0:
12355 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12356 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12357 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [19,19,19,19]
12358 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12359 ; AVX512VPOPCNTDQ-NEXT: retq
12361 ; AVX512VPOPCNTDQVL-LABEL: ult_19_v4i64:
12362 ; AVX512VPOPCNTDQVL: # %bb.0:
12363 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12364 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [19,19,19,19]
12365 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12366 ; AVX512VPOPCNTDQVL-NEXT: retq
12368 ; BITALG_NOVLX-LABEL: ult_19_v4i64:
12369 ; BITALG_NOVLX: # %bb.0:
12370 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12371 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12372 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12373 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12374 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [19,19,19,19]
12375 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12376 ; BITALG_NOVLX-NEXT: retq
12378 ; BITALG-LABEL: ult_19_v4i64:
12380 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12381 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12382 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12383 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [19,19,19,19]
12384 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12385 ; BITALG-NEXT: retq
12386 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12387 %3 = icmp ult <4 x i64> %2, <i64 19, i64 19, i64 19, i64 19>
12388 %4 = sext <4 x i1> %3 to <4 x i64>
12392 define <4 x i64> @ugt_19_v4i64(<4 x i64> %0) {
12393 ; AVX1-LABEL: ugt_19_v4i64:
12395 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12396 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12397 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12398 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12399 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12400 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12401 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12402 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12403 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12404 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12405 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12406 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12407 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12408 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12409 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12410 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12411 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12412 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12413 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [19,19]
12414 ; AVX1-NEXT: # xmm1 = mem[0,0]
12415 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
12416 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
12417 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12420 ; AVX2-LABEL: ugt_19_v4i64:
12422 ; AVX2-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]
12423 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12424 ; AVX2-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]
12425 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12426 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12427 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12428 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12429 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12430 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12431 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12432 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12433 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [19,19,19,19]
12434 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12437 ; AVX512VPOPCNTDQ-LABEL: ugt_19_v4i64:
12438 ; AVX512VPOPCNTDQ: # %bb.0:
12439 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12440 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12441 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [19,19,19,19]
12442 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12443 ; AVX512VPOPCNTDQ-NEXT: retq
12445 ; AVX512VPOPCNTDQVL-LABEL: ugt_19_v4i64:
12446 ; AVX512VPOPCNTDQVL: # %bb.0:
12447 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12448 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [19,19,19,19]
12449 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12450 ; AVX512VPOPCNTDQVL-NEXT: retq
12452 ; BITALG_NOVLX-LABEL: ugt_19_v4i64:
12453 ; BITALG_NOVLX: # %bb.0:
12454 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12455 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12456 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12457 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12458 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [19,19,19,19]
12459 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12460 ; BITALG_NOVLX-NEXT: retq
12462 ; BITALG-LABEL: ugt_19_v4i64:
12464 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12465 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12466 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12467 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [19,19,19,19]
12468 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12469 ; BITALG-NEXT: retq
12470 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12471 %3 = icmp ugt <4 x i64> %2, <i64 19, i64 19, i64 19, i64 19>
12472 %4 = sext <4 x i1> %3 to <4 x i64>
12476 define <4 x i64> @ult_20_v4i64(<4 x i64> %0) {
12477 ; AVX1-LABEL: ult_20_v4i64:
12479 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12480 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12481 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12482 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12483 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12484 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12485 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12486 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12487 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12488 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12489 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12490 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12491 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12492 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12493 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12494 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12495 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12496 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12497 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [20,20]
12498 ; AVX1-NEXT: # xmm1 = mem[0,0]
12499 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
12500 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
12501 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12504 ; AVX2-LABEL: ult_20_v4i64:
12506 ; AVX2-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]
12507 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12508 ; AVX2-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]
12509 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12510 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12511 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12512 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12513 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12514 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12515 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12516 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12517 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [20,20,20,20]
12518 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12521 ; AVX512VPOPCNTDQ-LABEL: ult_20_v4i64:
12522 ; AVX512VPOPCNTDQ: # %bb.0:
12523 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12524 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12525 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [20,20,20,20]
12526 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12527 ; AVX512VPOPCNTDQ-NEXT: retq
12529 ; AVX512VPOPCNTDQVL-LABEL: ult_20_v4i64:
12530 ; AVX512VPOPCNTDQVL: # %bb.0:
12531 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12532 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [20,20,20,20]
12533 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12534 ; AVX512VPOPCNTDQVL-NEXT: retq
12536 ; BITALG_NOVLX-LABEL: ult_20_v4i64:
12537 ; BITALG_NOVLX: # %bb.0:
12538 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12539 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12540 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12541 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12542 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [20,20,20,20]
12543 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12544 ; BITALG_NOVLX-NEXT: retq
12546 ; BITALG-LABEL: ult_20_v4i64:
12548 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12549 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12550 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12551 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [20,20,20,20]
12552 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12553 ; BITALG-NEXT: retq
12554 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12555 %3 = icmp ult <4 x i64> %2, <i64 20, i64 20, i64 20, i64 20>
12556 %4 = sext <4 x i1> %3 to <4 x i64>
12560 define <4 x i64> @ugt_20_v4i64(<4 x i64> %0) {
12561 ; AVX1-LABEL: ugt_20_v4i64:
12563 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12564 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12565 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12566 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12567 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12568 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12569 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12570 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12571 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12572 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12573 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12574 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12575 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12576 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12577 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12578 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12579 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12580 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12581 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [20,20]
12582 ; AVX1-NEXT: # xmm1 = mem[0,0]
12583 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
12584 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
12585 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12588 ; AVX2-LABEL: ugt_20_v4i64:
12590 ; AVX2-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]
12591 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12592 ; AVX2-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]
12593 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12594 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12595 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12596 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12597 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12598 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12599 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12600 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12601 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [20,20,20,20]
12602 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12605 ; AVX512VPOPCNTDQ-LABEL: ugt_20_v4i64:
12606 ; AVX512VPOPCNTDQ: # %bb.0:
12607 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12608 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12609 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [20,20,20,20]
12610 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12611 ; AVX512VPOPCNTDQ-NEXT: retq
12613 ; AVX512VPOPCNTDQVL-LABEL: ugt_20_v4i64:
12614 ; AVX512VPOPCNTDQVL: # %bb.0:
12615 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12616 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [20,20,20,20]
12617 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12618 ; AVX512VPOPCNTDQVL-NEXT: retq
12620 ; BITALG_NOVLX-LABEL: ugt_20_v4i64:
12621 ; BITALG_NOVLX: # %bb.0:
12622 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12623 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12624 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12625 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12626 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [20,20,20,20]
12627 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12628 ; BITALG_NOVLX-NEXT: retq
12630 ; BITALG-LABEL: ugt_20_v4i64:
12632 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12633 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12634 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12635 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [20,20,20,20]
12636 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12637 ; BITALG-NEXT: retq
12638 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12639 %3 = icmp ugt <4 x i64> %2, <i64 20, i64 20, i64 20, i64 20>
12640 %4 = sext <4 x i1> %3 to <4 x i64>
12644 define <4 x i64> @ult_21_v4i64(<4 x i64> %0) {
12645 ; AVX1-LABEL: ult_21_v4i64:
12647 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12648 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12649 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12650 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12651 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12652 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12653 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12654 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12655 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12656 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12657 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12658 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12659 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12660 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12661 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12662 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12663 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12664 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12665 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [21,21]
12666 ; AVX1-NEXT: # xmm1 = mem[0,0]
12667 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
12668 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
12669 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12672 ; AVX2-LABEL: ult_21_v4i64:
12674 ; AVX2-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]
12675 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12676 ; AVX2-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]
12677 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12678 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12679 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12680 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12681 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12682 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12683 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12684 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12685 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [21,21,21,21]
12686 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12689 ; AVX512VPOPCNTDQ-LABEL: ult_21_v4i64:
12690 ; AVX512VPOPCNTDQ: # %bb.0:
12691 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12692 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12693 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [21,21,21,21]
12694 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12695 ; AVX512VPOPCNTDQ-NEXT: retq
12697 ; AVX512VPOPCNTDQVL-LABEL: ult_21_v4i64:
12698 ; AVX512VPOPCNTDQVL: # %bb.0:
12699 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12700 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [21,21,21,21]
12701 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12702 ; AVX512VPOPCNTDQVL-NEXT: retq
12704 ; BITALG_NOVLX-LABEL: ult_21_v4i64:
12705 ; BITALG_NOVLX: # %bb.0:
12706 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12707 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12708 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12709 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12710 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [21,21,21,21]
12711 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12712 ; BITALG_NOVLX-NEXT: retq
12714 ; BITALG-LABEL: ult_21_v4i64:
12716 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12717 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12718 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12719 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [21,21,21,21]
12720 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12721 ; BITALG-NEXT: retq
12722 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12723 %3 = icmp ult <4 x i64> %2, <i64 21, i64 21, i64 21, i64 21>
12724 %4 = sext <4 x i1> %3 to <4 x i64>
12728 define <4 x i64> @ugt_21_v4i64(<4 x i64> %0) {
12729 ; AVX1-LABEL: ugt_21_v4i64:
12731 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12732 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12733 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12734 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12735 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12736 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12737 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12738 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12739 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12740 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12741 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12742 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12743 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12744 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12745 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12746 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12747 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12748 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12749 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [21,21]
12750 ; AVX1-NEXT: # xmm1 = mem[0,0]
12751 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
12752 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
12753 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12756 ; AVX2-LABEL: ugt_21_v4i64:
12758 ; AVX2-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]
12759 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12760 ; AVX2-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]
12761 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12762 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12763 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12764 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12765 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12766 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12767 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12768 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12769 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [21,21,21,21]
12770 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12773 ; AVX512VPOPCNTDQ-LABEL: ugt_21_v4i64:
12774 ; AVX512VPOPCNTDQ: # %bb.0:
12775 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12776 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12777 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [21,21,21,21]
12778 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12779 ; AVX512VPOPCNTDQ-NEXT: retq
12781 ; AVX512VPOPCNTDQVL-LABEL: ugt_21_v4i64:
12782 ; AVX512VPOPCNTDQVL: # %bb.0:
12783 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12784 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [21,21,21,21]
12785 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12786 ; AVX512VPOPCNTDQVL-NEXT: retq
12788 ; BITALG_NOVLX-LABEL: ugt_21_v4i64:
12789 ; BITALG_NOVLX: # %bb.0:
12790 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12791 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12792 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12793 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12794 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [21,21,21,21]
12795 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12796 ; BITALG_NOVLX-NEXT: retq
12798 ; BITALG-LABEL: ugt_21_v4i64:
12800 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12801 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12802 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12803 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [21,21,21,21]
12804 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12805 ; BITALG-NEXT: retq
12806 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12807 %3 = icmp ugt <4 x i64> %2, <i64 21, i64 21, i64 21, i64 21>
12808 %4 = sext <4 x i1> %3 to <4 x i64>
12812 define <4 x i64> @ult_22_v4i64(<4 x i64> %0) {
12813 ; AVX1-LABEL: ult_22_v4i64:
12815 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12816 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12817 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12818 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12819 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12820 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12821 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12822 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12823 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12824 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12825 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12826 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12827 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12828 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12829 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12830 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12831 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12832 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12833 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [22,22]
12834 ; AVX1-NEXT: # xmm1 = mem[0,0]
12835 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
12836 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
12837 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12840 ; AVX2-LABEL: ult_22_v4i64:
12842 ; AVX2-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]
12843 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12844 ; AVX2-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]
12845 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12846 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12847 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12848 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12849 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12850 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12851 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12852 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12853 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [22,22,22,22]
12854 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12857 ; AVX512VPOPCNTDQ-LABEL: ult_22_v4i64:
12858 ; AVX512VPOPCNTDQ: # %bb.0:
12859 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12860 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12861 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [22,22,22,22]
12862 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12863 ; AVX512VPOPCNTDQ-NEXT: retq
12865 ; AVX512VPOPCNTDQVL-LABEL: ult_22_v4i64:
12866 ; AVX512VPOPCNTDQVL: # %bb.0:
12867 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12868 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [22,22,22,22]
12869 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12870 ; AVX512VPOPCNTDQVL-NEXT: retq
12872 ; BITALG_NOVLX-LABEL: ult_22_v4i64:
12873 ; BITALG_NOVLX: # %bb.0:
12874 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12875 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12876 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12877 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12878 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [22,22,22,22]
12879 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12880 ; BITALG_NOVLX-NEXT: retq
12882 ; BITALG-LABEL: ult_22_v4i64:
12884 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12885 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12886 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12887 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [22,22,22,22]
12888 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
12889 ; BITALG-NEXT: retq
12890 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12891 %3 = icmp ult <4 x i64> %2, <i64 22, i64 22, i64 22, i64 22>
12892 %4 = sext <4 x i1> %3 to <4 x i64>
12896 define <4 x i64> @ugt_22_v4i64(<4 x i64> %0) {
12897 ; AVX1-LABEL: ugt_22_v4i64:
12899 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12900 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12901 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12902 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12903 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12904 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12905 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12906 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12907 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12908 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12909 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12910 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12911 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12912 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12913 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12914 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12915 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
12916 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
12917 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [22,22]
12918 ; AVX1-NEXT: # xmm1 = mem[0,0]
12919 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
12920 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
12921 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
12924 ; AVX2-LABEL: ugt_22_v4i64:
12926 ; AVX2-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]
12927 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
12928 ; AVX2-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]
12929 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
12930 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
12931 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
12932 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
12933 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
12934 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
12935 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
12936 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12937 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [22,22,22,22]
12938 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12941 ; AVX512VPOPCNTDQ-LABEL: ugt_22_v4i64:
12942 ; AVX512VPOPCNTDQ: # %bb.0:
12943 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12944 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12945 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [22,22,22,22]
12946 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12947 ; AVX512VPOPCNTDQ-NEXT: retq
12949 ; AVX512VPOPCNTDQVL-LABEL: ugt_22_v4i64:
12950 ; AVX512VPOPCNTDQVL: # %bb.0:
12951 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
12952 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [22,22,22,22]
12953 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12954 ; AVX512VPOPCNTDQVL-NEXT: retq
12956 ; BITALG_NOVLX-LABEL: ugt_22_v4i64:
12957 ; BITALG_NOVLX: # %bb.0:
12958 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
12959 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
12960 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
12961 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12962 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [22,22,22,22]
12963 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12964 ; BITALG_NOVLX-NEXT: retq
12966 ; BITALG-LABEL: ugt_22_v4i64:
12968 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
12969 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12970 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
12971 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [22,22,22,22]
12972 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
12973 ; BITALG-NEXT: retq
12974 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
12975 %3 = icmp ugt <4 x i64> %2, <i64 22, i64 22, i64 22, i64 22>
12976 %4 = sext <4 x i1> %3 to <4 x i64>
12980 define <4 x i64> @ult_23_v4i64(<4 x i64> %0) {
12981 ; AVX1-LABEL: ult_23_v4i64:
12983 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12984 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
12985 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12986 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
12987 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
12988 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
12989 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
12990 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
12991 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
12992 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
12993 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
12994 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
12995 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
12996 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
12997 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
12998 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
12999 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13000 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13001 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [23,23]
13002 ; AVX1-NEXT: # xmm1 = mem[0,0]
13003 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
13004 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
13005 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13008 ; AVX2-LABEL: ult_23_v4i64:
13010 ; AVX2-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]
13011 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13012 ; AVX2-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]
13013 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13014 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13015 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13016 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13017 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13018 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13019 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13020 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13021 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [23,23,23,23]
13022 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13025 ; AVX512VPOPCNTDQ-LABEL: ult_23_v4i64:
13026 ; AVX512VPOPCNTDQ: # %bb.0:
13027 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13028 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13029 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [23,23,23,23]
13030 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13031 ; AVX512VPOPCNTDQ-NEXT: retq
13033 ; AVX512VPOPCNTDQVL-LABEL: ult_23_v4i64:
13034 ; AVX512VPOPCNTDQVL: # %bb.0:
13035 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13036 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [23,23,23,23]
13037 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13038 ; AVX512VPOPCNTDQVL-NEXT: retq
13040 ; BITALG_NOVLX-LABEL: ult_23_v4i64:
13041 ; BITALG_NOVLX: # %bb.0:
13042 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13043 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13044 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13045 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13046 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [23,23,23,23]
13047 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13048 ; BITALG_NOVLX-NEXT: retq
13050 ; BITALG-LABEL: ult_23_v4i64:
13052 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13053 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13054 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13055 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [23,23,23,23]
13056 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13057 ; BITALG-NEXT: retq
13058 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13059 %3 = icmp ult <4 x i64> %2, <i64 23, i64 23, i64 23, i64 23>
13060 %4 = sext <4 x i1> %3 to <4 x i64>
13064 define <4 x i64> @ugt_23_v4i64(<4 x i64> %0) {
13065 ; AVX1-LABEL: ugt_23_v4i64:
13067 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13068 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13069 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13070 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13071 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13072 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13073 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13074 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13075 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13076 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13077 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13078 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13079 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13080 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13081 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13082 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13083 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13084 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13085 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [23,23]
13086 ; AVX1-NEXT: # xmm1 = mem[0,0]
13087 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
13088 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
13089 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13092 ; AVX2-LABEL: ugt_23_v4i64:
13094 ; AVX2-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]
13095 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13096 ; AVX2-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]
13097 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13098 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13099 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13100 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13101 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13102 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13103 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13104 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13105 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [23,23,23,23]
13106 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13109 ; AVX512VPOPCNTDQ-LABEL: ugt_23_v4i64:
13110 ; AVX512VPOPCNTDQ: # %bb.0:
13111 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13112 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13113 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [23,23,23,23]
13114 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13115 ; AVX512VPOPCNTDQ-NEXT: retq
13117 ; AVX512VPOPCNTDQVL-LABEL: ugt_23_v4i64:
13118 ; AVX512VPOPCNTDQVL: # %bb.0:
13119 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13120 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [23,23,23,23]
13121 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13122 ; AVX512VPOPCNTDQVL-NEXT: retq
13124 ; BITALG_NOVLX-LABEL: ugt_23_v4i64:
13125 ; BITALG_NOVLX: # %bb.0:
13126 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13127 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13128 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13129 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13130 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [23,23,23,23]
13131 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13132 ; BITALG_NOVLX-NEXT: retq
13134 ; BITALG-LABEL: ugt_23_v4i64:
13136 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13137 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13138 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13139 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [23,23,23,23]
13140 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13141 ; BITALG-NEXT: retq
13142 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13143 %3 = icmp ugt <4 x i64> %2, <i64 23, i64 23, i64 23, i64 23>
13144 %4 = sext <4 x i1> %3 to <4 x i64>
13148 define <4 x i64> @ult_24_v4i64(<4 x i64> %0) {
13149 ; AVX1-LABEL: ult_24_v4i64:
13151 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13152 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13153 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13154 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13155 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13156 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13157 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13158 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13159 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13160 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13161 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13162 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13163 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13164 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13165 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13166 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13167 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13168 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13169 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [24,24]
13170 ; AVX1-NEXT: # xmm1 = mem[0,0]
13171 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
13172 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
13173 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13176 ; AVX2-LABEL: ult_24_v4i64:
13178 ; AVX2-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]
13179 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13180 ; AVX2-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]
13181 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13182 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13183 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13184 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13185 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13186 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13187 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13188 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13189 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [24,24,24,24]
13190 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13193 ; AVX512VPOPCNTDQ-LABEL: ult_24_v4i64:
13194 ; AVX512VPOPCNTDQ: # %bb.0:
13195 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13196 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13197 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [24,24,24,24]
13198 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13199 ; AVX512VPOPCNTDQ-NEXT: retq
13201 ; AVX512VPOPCNTDQVL-LABEL: ult_24_v4i64:
13202 ; AVX512VPOPCNTDQVL: # %bb.0:
13203 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13204 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [24,24,24,24]
13205 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13206 ; AVX512VPOPCNTDQVL-NEXT: retq
13208 ; BITALG_NOVLX-LABEL: ult_24_v4i64:
13209 ; BITALG_NOVLX: # %bb.0:
13210 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13211 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13212 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13213 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13214 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [24,24,24,24]
13215 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13216 ; BITALG_NOVLX-NEXT: retq
13218 ; BITALG-LABEL: ult_24_v4i64:
13220 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13221 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13222 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13223 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [24,24,24,24]
13224 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13225 ; BITALG-NEXT: retq
13226 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13227 %3 = icmp ult <4 x i64> %2, <i64 24, i64 24, i64 24, i64 24>
13228 %4 = sext <4 x i1> %3 to <4 x i64>
13232 define <4 x i64> @ugt_24_v4i64(<4 x i64> %0) {
13233 ; AVX1-LABEL: ugt_24_v4i64:
13235 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13236 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13237 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13238 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13239 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13240 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13241 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13242 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13243 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13244 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13245 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13246 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13247 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13248 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13249 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13250 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13251 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13252 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13253 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [24,24]
13254 ; AVX1-NEXT: # xmm1 = mem[0,0]
13255 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
13256 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
13257 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13260 ; AVX2-LABEL: ugt_24_v4i64:
13262 ; AVX2-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]
13263 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13264 ; AVX2-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]
13265 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13266 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13267 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13268 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13269 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13270 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13271 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13272 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13273 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [24,24,24,24]
13274 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13277 ; AVX512VPOPCNTDQ-LABEL: ugt_24_v4i64:
13278 ; AVX512VPOPCNTDQ: # %bb.0:
13279 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13280 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13281 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [24,24,24,24]
13282 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13283 ; AVX512VPOPCNTDQ-NEXT: retq
13285 ; AVX512VPOPCNTDQVL-LABEL: ugt_24_v4i64:
13286 ; AVX512VPOPCNTDQVL: # %bb.0:
13287 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13288 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [24,24,24,24]
13289 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13290 ; AVX512VPOPCNTDQVL-NEXT: retq
13292 ; BITALG_NOVLX-LABEL: ugt_24_v4i64:
13293 ; BITALG_NOVLX: # %bb.0:
13294 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13295 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13296 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13297 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13298 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [24,24,24,24]
13299 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13300 ; BITALG_NOVLX-NEXT: retq
13302 ; BITALG-LABEL: ugt_24_v4i64:
13304 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13305 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13306 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13307 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [24,24,24,24]
13308 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13309 ; BITALG-NEXT: retq
13310 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13311 %3 = icmp ugt <4 x i64> %2, <i64 24, i64 24, i64 24, i64 24>
13312 %4 = sext <4 x i1> %3 to <4 x i64>
13316 define <4 x i64> @ult_25_v4i64(<4 x i64> %0) {
13317 ; AVX1-LABEL: ult_25_v4i64:
13319 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13320 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13321 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13322 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13323 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13324 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13325 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13326 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13327 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13328 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13329 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13330 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13331 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13332 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13333 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13334 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13335 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13336 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13337 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [25,25]
13338 ; AVX1-NEXT: # xmm1 = mem[0,0]
13339 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
13340 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
13341 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13344 ; AVX2-LABEL: ult_25_v4i64:
13346 ; AVX2-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]
13347 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13348 ; AVX2-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]
13349 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13350 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13351 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13352 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13353 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13354 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13355 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13356 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13357 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [25,25,25,25]
13358 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13361 ; AVX512VPOPCNTDQ-LABEL: ult_25_v4i64:
13362 ; AVX512VPOPCNTDQ: # %bb.0:
13363 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13364 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13365 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [25,25,25,25]
13366 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13367 ; AVX512VPOPCNTDQ-NEXT: retq
13369 ; AVX512VPOPCNTDQVL-LABEL: ult_25_v4i64:
13370 ; AVX512VPOPCNTDQVL: # %bb.0:
13371 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13372 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [25,25,25,25]
13373 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13374 ; AVX512VPOPCNTDQVL-NEXT: retq
13376 ; BITALG_NOVLX-LABEL: ult_25_v4i64:
13377 ; BITALG_NOVLX: # %bb.0:
13378 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13379 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13380 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13381 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13382 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [25,25,25,25]
13383 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13384 ; BITALG_NOVLX-NEXT: retq
13386 ; BITALG-LABEL: ult_25_v4i64:
13388 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13389 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13390 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13391 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [25,25,25,25]
13392 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13393 ; BITALG-NEXT: retq
13394 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13395 %3 = icmp ult <4 x i64> %2, <i64 25, i64 25, i64 25, i64 25>
13396 %4 = sext <4 x i1> %3 to <4 x i64>
13400 define <4 x i64> @ugt_25_v4i64(<4 x i64> %0) {
13401 ; AVX1-LABEL: ugt_25_v4i64:
13403 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13404 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13405 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13406 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13407 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13408 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13409 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13410 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13411 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13412 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13413 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13414 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13415 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13416 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13417 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13418 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13419 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13420 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13421 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [25,25]
13422 ; AVX1-NEXT: # xmm1 = mem[0,0]
13423 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
13424 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
13425 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13428 ; AVX2-LABEL: ugt_25_v4i64:
13430 ; AVX2-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]
13431 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13432 ; AVX2-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]
13433 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13434 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13435 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13436 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13437 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13438 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13439 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13440 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13441 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [25,25,25,25]
13442 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13445 ; AVX512VPOPCNTDQ-LABEL: ugt_25_v4i64:
13446 ; AVX512VPOPCNTDQ: # %bb.0:
13447 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13448 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13449 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [25,25,25,25]
13450 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13451 ; AVX512VPOPCNTDQ-NEXT: retq
13453 ; AVX512VPOPCNTDQVL-LABEL: ugt_25_v4i64:
13454 ; AVX512VPOPCNTDQVL: # %bb.0:
13455 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13456 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [25,25,25,25]
13457 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13458 ; AVX512VPOPCNTDQVL-NEXT: retq
13460 ; BITALG_NOVLX-LABEL: ugt_25_v4i64:
13461 ; BITALG_NOVLX: # %bb.0:
13462 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13463 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13464 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13465 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13466 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [25,25,25,25]
13467 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13468 ; BITALG_NOVLX-NEXT: retq
13470 ; BITALG-LABEL: ugt_25_v4i64:
13472 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13473 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13474 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13475 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [25,25,25,25]
13476 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13477 ; BITALG-NEXT: retq
13478 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13479 %3 = icmp ugt <4 x i64> %2, <i64 25, i64 25, i64 25, i64 25>
13480 %4 = sext <4 x i1> %3 to <4 x i64>
13484 define <4 x i64> @ult_26_v4i64(<4 x i64> %0) {
13485 ; AVX1-LABEL: ult_26_v4i64:
13487 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13488 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13489 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13490 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13491 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13492 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13493 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13494 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13495 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13496 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13497 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13498 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13499 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13500 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13501 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13502 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13503 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13504 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13505 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [26,26]
13506 ; AVX1-NEXT: # xmm1 = mem[0,0]
13507 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
13508 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
13509 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13512 ; AVX2-LABEL: ult_26_v4i64:
13514 ; AVX2-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]
13515 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13516 ; AVX2-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]
13517 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13518 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13519 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13520 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13521 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13522 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13523 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13524 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13525 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [26,26,26,26]
13526 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13529 ; AVX512VPOPCNTDQ-LABEL: ult_26_v4i64:
13530 ; AVX512VPOPCNTDQ: # %bb.0:
13531 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13532 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13533 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [26,26,26,26]
13534 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13535 ; AVX512VPOPCNTDQ-NEXT: retq
13537 ; AVX512VPOPCNTDQVL-LABEL: ult_26_v4i64:
13538 ; AVX512VPOPCNTDQVL: # %bb.0:
13539 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13540 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [26,26,26,26]
13541 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13542 ; AVX512VPOPCNTDQVL-NEXT: retq
13544 ; BITALG_NOVLX-LABEL: ult_26_v4i64:
13545 ; BITALG_NOVLX: # %bb.0:
13546 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13547 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13548 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13549 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13550 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [26,26,26,26]
13551 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13552 ; BITALG_NOVLX-NEXT: retq
13554 ; BITALG-LABEL: ult_26_v4i64:
13556 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13557 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13558 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13559 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [26,26,26,26]
13560 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13561 ; BITALG-NEXT: retq
13562 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13563 %3 = icmp ult <4 x i64> %2, <i64 26, i64 26, i64 26, i64 26>
13564 %4 = sext <4 x i1> %3 to <4 x i64>
13568 define <4 x i64> @ugt_26_v4i64(<4 x i64> %0) {
13569 ; AVX1-LABEL: ugt_26_v4i64:
13571 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13572 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13573 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13574 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13575 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13576 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13577 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13578 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13579 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13580 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13581 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13582 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13583 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13584 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13585 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13586 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13587 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13588 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13589 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [26,26]
13590 ; AVX1-NEXT: # xmm1 = mem[0,0]
13591 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
13592 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
13593 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13596 ; AVX2-LABEL: ugt_26_v4i64:
13598 ; AVX2-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]
13599 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13600 ; AVX2-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]
13601 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13602 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13603 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13604 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13605 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13606 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13607 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13608 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13609 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [26,26,26,26]
13610 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13613 ; AVX512VPOPCNTDQ-LABEL: ugt_26_v4i64:
13614 ; AVX512VPOPCNTDQ: # %bb.0:
13615 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13616 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13617 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [26,26,26,26]
13618 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13619 ; AVX512VPOPCNTDQ-NEXT: retq
13621 ; AVX512VPOPCNTDQVL-LABEL: ugt_26_v4i64:
13622 ; AVX512VPOPCNTDQVL: # %bb.0:
13623 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13624 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [26,26,26,26]
13625 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13626 ; AVX512VPOPCNTDQVL-NEXT: retq
13628 ; BITALG_NOVLX-LABEL: ugt_26_v4i64:
13629 ; BITALG_NOVLX: # %bb.0:
13630 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13631 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13632 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13633 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13634 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [26,26,26,26]
13635 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13636 ; BITALG_NOVLX-NEXT: retq
13638 ; BITALG-LABEL: ugt_26_v4i64:
13640 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13641 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13642 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13643 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [26,26,26,26]
13644 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13645 ; BITALG-NEXT: retq
13646 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13647 %3 = icmp ugt <4 x i64> %2, <i64 26, i64 26, i64 26, i64 26>
13648 %4 = sext <4 x i1> %3 to <4 x i64>
13652 define <4 x i64> @ult_27_v4i64(<4 x i64> %0) {
13653 ; AVX1-LABEL: ult_27_v4i64:
13655 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13656 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13657 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13658 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13659 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13660 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13661 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13662 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13663 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13664 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13665 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13666 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13667 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13668 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13669 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13670 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13671 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13672 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13673 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [27,27]
13674 ; AVX1-NEXT: # xmm1 = mem[0,0]
13675 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
13676 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
13677 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13680 ; AVX2-LABEL: ult_27_v4i64:
13682 ; AVX2-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]
13683 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13684 ; AVX2-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]
13685 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13686 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13687 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13688 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13689 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13690 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13691 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13692 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13693 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [27,27,27,27]
13694 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13697 ; AVX512VPOPCNTDQ-LABEL: ult_27_v4i64:
13698 ; AVX512VPOPCNTDQ: # %bb.0:
13699 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13700 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13701 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [27,27,27,27]
13702 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13703 ; AVX512VPOPCNTDQ-NEXT: retq
13705 ; AVX512VPOPCNTDQVL-LABEL: ult_27_v4i64:
13706 ; AVX512VPOPCNTDQVL: # %bb.0:
13707 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13708 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [27,27,27,27]
13709 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13710 ; AVX512VPOPCNTDQVL-NEXT: retq
13712 ; BITALG_NOVLX-LABEL: ult_27_v4i64:
13713 ; BITALG_NOVLX: # %bb.0:
13714 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13715 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13716 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13717 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13718 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [27,27,27,27]
13719 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13720 ; BITALG_NOVLX-NEXT: retq
13722 ; BITALG-LABEL: ult_27_v4i64:
13724 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13725 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13726 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13727 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [27,27,27,27]
13728 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13729 ; BITALG-NEXT: retq
13730 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13731 %3 = icmp ult <4 x i64> %2, <i64 27, i64 27, i64 27, i64 27>
13732 %4 = sext <4 x i1> %3 to <4 x i64>
13736 define <4 x i64> @ugt_27_v4i64(<4 x i64> %0) {
13737 ; AVX1-LABEL: ugt_27_v4i64:
13739 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13740 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13741 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13742 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13743 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13744 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13745 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13746 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13747 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13748 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13749 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13750 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13751 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13752 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13753 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13754 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13755 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13756 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13757 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [27,27]
13758 ; AVX1-NEXT: # xmm1 = mem[0,0]
13759 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
13760 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
13761 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13764 ; AVX2-LABEL: ugt_27_v4i64:
13766 ; AVX2-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]
13767 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13768 ; AVX2-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]
13769 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13770 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13771 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13772 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13773 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13774 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13775 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13776 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13777 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [27,27,27,27]
13778 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13781 ; AVX512VPOPCNTDQ-LABEL: ugt_27_v4i64:
13782 ; AVX512VPOPCNTDQ: # %bb.0:
13783 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13784 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13785 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [27,27,27,27]
13786 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13787 ; AVX512VPOPCNTDQ-NEXT: retq
13789 ; AVX512VPOPCNTDQVL-LABEL: ugt_27_v4i64:
13790 ; AVX512VPOPCNTDQVL: # %bb.0:
13791 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13792 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [27,27,27,27]
13793 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13794 ; AVX512VPOPCNTDQVL-NEXT: retq
13796 ; BITALG_NOVLX-LABEL: ugt_27_v4i64:
13797 ; BITALG_NOVLX: # %bb.0:
13798 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13799 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13800 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13801 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13802 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [27,27,27,27]
13803 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13804 ; BITALG_NOVLX-NEXT: retq
13806 ; BITALG-LABEL: ugt_27_v4i64:
13808 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13809 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13810 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13811 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [27,27,27,27]
13812 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13813 ; BITALG-NEXT: retq
13814 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13815 %3 = icmp ugt <4 x i64> %2, <i64 27, i64 27, i64 27, i64 27>
13816 %4 = sext <4 x i1> %3 to <4 x i64>
13820 define <4 x i64> @ult_28_v4i64(<4 x i64> %0) {
13821 ; AVX1-LABEL: ult_28_v4i64:
13823 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13824 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13825 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13826 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13827 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13828 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13829 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13830 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13831 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13832 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13833 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13834 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13835 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13836 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13837 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13838 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13839 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13840 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13841 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [28,28]
13842 ; AVX1-NEXT: # xmm1 = mem[0,0]
13843 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
13844 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
13845 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13848 ; AVX2-LABEL: ult_28_v4i64:
13850 ; AVX2-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]
13851 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13852 ; AVX2-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]
13853 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13854 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13855 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13856 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13857 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13858 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13859 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13860 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13861 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [28,28,28,28]
13862 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13865 ; AVX512VPOPCNTDQ-LABEL: ult_28_v4i64:
13866 ; AVX512VPOPCNTDQ: # %bb.0:
13867 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13868 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13869 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [28,28,28,28]
13870 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13871 ; AVX512VPOPCNTDQ-NEXT: retq
13873 ; AVX512VPOPCNTDQVL-LABEL: ult_28_v4i64:
13874 ; AVX512VPOPCNTDQVL: # %bb.0:
13875 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13876 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [28,28,28,28]
13877 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13878 ; AVX512VPOPCNTDQVL-NEXT: retq
13880 ; BITALG_NOVLX-LABEL: ult_28_v4i64:
13881 ; BITALG_NOVLX: # %bb.0:
13882 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13883 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13884 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13885 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13886 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [28,28,28,28]
13887 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13888 ; BITALG_NOVLX-NEXT: retq
13890 ; BITALG-LABEL: ult_28_v4i64:
13892 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13893 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13894 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13895 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [28,28,28,28]
13896 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
13897 ; BITALG-NEXT: retq
13898 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13899 %3 = icmp ult <4 x i64> %2, <i64 28, i64 28, i64 28, i64 28>
13900 %4 = sext <4 x i1> %3 to <4 x i64>
13904 define <4 x i64> @ugt_28_v4i64(<4 x i64> %0) {
13905 ; AVX1-LABEL: ugt_28_v4i64:
13907 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13908 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13909 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13910 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13911 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13912 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13913 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13914 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13915 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
13916 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
13917 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
13918 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
13919 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
13920 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
13921 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
13922 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
13923 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
13924 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
13925 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [28,28]
13926 ; AVX1-NEXT: # xmm1 = mem[0,0]
13927 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
13928 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
13929 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
13932 ; AVX2-LABEL: ugt_28_v4i64:
13934 ; AVX2-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]
13935 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
13936 ; AVX2-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]
13937 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
13938 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
13939 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
13940 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
13941 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
13942 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
13943 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
13944 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13945 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [28,28,28,28]
13946 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13949 ; AVX512VPOPCNTDQ-LABEL: ugt_28_v4i64:
13950 ; AVX512VPOPCNTDQ: # %bb.0:
13951 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13952 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13953 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [28,28,28,28]
13954 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13955 ; AVX512VPOPCNTDQ-NEXT: retq
13957 ; AVX512VPOPCNTDQVL-LABEL: ugt_28_v4i64:
13958 ; AVX512VPOPCNTDQVL: # %bb.0:
13959 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
13960 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [28,28,28,28]
13961 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13962 ; AVX512VPOPCNTDQVL-NEXT: retq
13964 ; BITALG_NOVLX-LABEL: ugt_28_v4i64:
13965 ; BITALG_NOVLX: # %bb.0:
13966 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
13967 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
13968 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
13969 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13970 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [28,28,28,28]
13971 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13972 ; BITALG_NOVLX-NEXT: retq
13974 ; BITALG-LABEL: ugt_28_v4i64:
13976 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
13977 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13978 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
13979 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [28,28,28,28]
13980 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
13981 ; BITALG-NEXT: retq
13982 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
13983 %3 = icmp ugt <4 x i64> %2, <i64 28, i64 28, i64 28, i64 28>
13984 %4 = sext <4 x i1> %3 to <4 x i64>
13988 define <4 x i64> @ult_29_v4i64(<4 x i64> %0) {
13989 ; AVX1-LABEL: ult_29_v4i64:
13991 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13992 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
13993 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13994 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
13995 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
13996 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
13997 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
13998 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
13999 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14000 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14001 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14002 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14003 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14004 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14005 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14006 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14007 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14008 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14009 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [29,29]
14010 ; AVX1-NEXT: # xmm1 = mem[0,0]
14011 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
14012 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
14013 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14016 ; AVX2-LABEL: ult_29_v4i64:
14018 ; AVX2-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]
14019 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14020 ; AVX2-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]
14021 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14022 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14023 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14024 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14025 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14026 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14027 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14028 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14029 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [29,29,29,29]
14030 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14033 ; AVX512VPOPCNTDQ-LABEL: ult_29_v4i64:
14034 ; AVX512VPOPCNTDQ: # %bb.0:
14035 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14036 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14037 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [29,29,29,29]
14038 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14039 ; AVX512VPOPCNTDQ-NEXT: retq
14041 ; AVX512VPOPCNTDQVL-LABEL: ult_29_v4i64:
14042 ; AVX512VPOPCNTDQVL: # %bb.0:
14043 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14044 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [29,29,29,29]
14045 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14046 ; AVX512VPOPCNTDQVL-NEXT: retq
14048 ; BITALG_NOVLX-LABEL: ult_29_v4i64:
14049 ; BITALG_NOVLX: # %bb.0:
14050 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14051 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14052 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14053 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14054 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [29,29,29,29]
14055 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14056 ; BITALG_NOVLX-NEXT: retq
14058 ; BITALG-LABEL: ult_29_v4i64:
14060 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14061 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14062 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14063 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [29,29,29,29]
14064 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14065 ; BITALG-NEXT: retq
14066 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14067 %3 = icmp ult <4 x i64> %2, <i64 29, i64 29, i64 29, i64 29>
14068 %4 = sext <4 x i1> %3 to <4 x i64>
14072 define <4 x i64> @ugt_29_v4i64(<4 x i64> %0) {
14073 ; AVX1-LABEL: ugt_29_v4i64:
14075 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14076 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14077 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14078 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14079 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14080 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14081 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14082 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14083 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14084 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14085 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14086 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14087 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14088 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14089 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14090 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14091 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14092 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14093 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [29,29]
14094 ; AVX1-NEXT: # xmm1 = mem[0,0]
14095 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
14096 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
14097 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14100 ; AVX2-LABEL: ugt_29_v4i64:
14102 ; AVX2-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]
14103 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14104 ; AVX2-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]
14105 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14106 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14107 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14108 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14109 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14110 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14111 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14112 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14113 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [29,29,29,29]
14114 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14117 ; AVX512VPOPCNTDQ-LABEL: ugt_29_v4i64:
14118 ; AVX512VPOPCNTDQ: # %bb.0:
14119 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14120 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14121 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [29,29,29,29]
14122 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14123 ; AVX512VPOPCNTDQ-NEXT: retq
14125 ; AVX512VPOPCNTDQVL-LABEL: ugt_29_v4i64:
14126 ; AVX512VPOPCNTDQVL: # %bb.0:
14127 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14128 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [29,29,29,29]
14129 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14130 ; AVX512VPOPCNTDQVL-NEXT: retq
14132 ; BITALG_NOVLX-LABEL: ugt_29_v4i64:
14133 ; BITALG_NOVLX: # %bb.0:
14134 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14135 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14136 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14137 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14138 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [29,29,29,29]
14139 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14140 ; BITALG_NOVLX-NEXT: retq
14142 ; BITALG-LABEL: ugt_29_v4i64:
14144 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14145 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14146 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14147 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [29,29,29,29]
14148 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14149 ; BITALG-NEXT: retq
14150 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14151 %3 = icmp ugt <4 x i64> %2, <i64 29, i64 29, i64 29, i64 29>
14152 %4 = sext <4 x i1> %3 to <4 x i64>
14156 define <4 x i64> @ult_30_v4i64(<4 x i64> %0) {
14157 ; AVX1-LABEL: ult_30_v4i64:
14159 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14160 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14161 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14162 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14163 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14164 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14165 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14166 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14167 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14168 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14169 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14170 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14171 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14172 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14173 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14174 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14175 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14176 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14177 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [30,30]
14178 ; AVX1-NEXT: # xmm1 = mem[0,0]
14179 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
14180 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
14181 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14184 ; AVX2-LABEL: ult_30_v4i64:
14186 ; AVX2-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]
14187 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14188 ; AVX2-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]
14189 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14190 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14191 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14192 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14193 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14194 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14195 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14196 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14197 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [30,30,30,30]
14198 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14201 ; AVX512VPOPCNTDQ-LABEL: ult_30_v4i64:
14202 ; AVX512VPOPCNTDQ: # %bb.0:
14203 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14204 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14205 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [30,30,30,30]
14206 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14207 ; AVX512VPOPCNTDQ-NEXT: retq
14209 ; AVX512VPOPCNTDQVL-LABEL: ult_30_v4i64:
14210 ; AVX512VPOPCNTDQVL: # %bb.0:
14211 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14212 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [30,30,30,30]
14213 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14214 ; AVX512VPOPCNTDQVL-NEXT: retq
14216 ; BITALG_NOVLX-LABEL: ult_30_v4i64:
14217 ; BITALG_NOVLX: # %bb.0:
14218 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14219 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14220 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14221 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14222 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [30,30,30,30]
14223 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14224 ; BITALG_NOVLX-NEXT: retq
14226 ; BITALG-LABEL: ult_30_v4i64:
14228 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14229 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14230 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14231 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [30,30,30,30]
14232 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14233 ; BITALG-NEXT: retq
14234 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14235 %3 = icmp ult <4 x i64> %2, <i64 30, i64 30, i64 30, i64 30>
14236 %4 = sext <4 x i1> %3 to <4 x i64>
14240 define <4 x i64> @ugt_30_v4i64(<4 x i64> %0) {
14241 ; AVX1-LABEL: ugt_30_v4i64:
14243 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14244 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14245 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14246 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14247 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14248 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14249 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14250 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14251 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14252 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14253 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14254 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14255 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14256 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14257 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14258 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14259 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14260 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14261 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [30,30]
14262 ; AVX1-NEXT: # xmm1 = mem[0,0]
14263 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
14264 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
14265 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14268 ; AVX2-LABEL: ugt_30_v4i64:
14270 ; AVX2-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]
14271 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14272 ; AVX2-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]
14273 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14274 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14275 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14276 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14277 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14278 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14279 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14280 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14281 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [30,30,30,30]
14282 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14285 ; AVX512VPOPCNTDQ-LABEL: ugt_30_v4i64:
14286 ; AVX512VPOPCNTDQ: # %bb.0:
14287 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14288 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14289 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [30,30,30,30]
14290 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14291 ; AVX512VPOPCNTDQ-NEXT: retq
14293 ; AVX512VPOPCNTDQVL-LABEL: ugt_30_v4i64:
14294 ; AVX512VPOPCNTDQVL: # %bb.0:
14295 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14296 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [30,30,30,30]
14297 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14298 ; AVX512VPOPCNTDQVL-NEXT: retq
14300 ; BITALG_NOVLX-LABEL: ugt_30_v4i64:
14301 ; BITALG_NOVLX: # %bb.0:
14302 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14303 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14304 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14305 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14306 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [30,30,30,30]
14307 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14308 ; BITALG_NOVLX-NEXT: retq
14310 ; BITALG-LABEL: ugt_30_v4i64:
14312 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14313 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14314 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14315 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [30,30,30,30]
14316 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14317 ; BITALG-NEXT: retq
14318 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14319 %3 = icmp ugt <4 x i64> %2, <i64 30, i64 30, i64 30, i64 30>
14320 %4 = sext <4 x i1> %3 to <4 x i64>
14324 define <4 x i64> @ult_31_v4i64(<4 x i64> %0) {
14325 ; AVX1-LABEL: ult_31_v4i64:
14327 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14328 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14329 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14330 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14331 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14332 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14333 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14334 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14335 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14336 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14337 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14338 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14339 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14340 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14341 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14342 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14343 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14344 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14345 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [31,31]
14346 ; AVX1-NEXT: # xmm1 = mem[0,0]
14347 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
14348 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
14349 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14352 ; AVX2-LABEL: ult_31_v4i64:
14354 ; AVX2-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]
14355 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14356 ; AVX2-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]
14357 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14358 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14359 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14360 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14361 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14362 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14363 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14364 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14365 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [31,31,31,31]
14366 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14369 ; AVX512VPOPCNTDQ-LABEL: ult_31_v4i64:
14370 ; AVX512VPOPCNTDQ: # %bb.0:
14371 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14372 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14373 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [31,31,31,31]
14374 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14375 ; AVX512VPOPCNTDQ-NEXT: retq
14377 ; AVX512VPOPCNTDQVL-LABEL: ult_31_v4i64:
14378 ; AVX512VPOPCNTDQVL: # %bb.0:
14379 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14380 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [31,31,31,31]
14381 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14382 ; AVX512VPOPCNTDQVL-NEXT: retq
14384 ; BITALG_NOVLX-LABEL: ult_31_v4i64:
14385 ; BITALG_NOVLX: # %bb.0:
14386 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14387 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14388 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14389 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14390 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [31,31,31,31]
14391 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14392 ; BITALG_NOVLX-NEXT: retq
14394 ; BITALG-LABEL: ult_31_v4i64:
14396 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14397 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14398 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14399 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [31,31,31,31]
14400 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14401 ; BITALG-NEXT: retq
14402 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14403 %3 = icmp ult <4 x i64> %2, <i64 31, i64 31, i64 31, i64 31>
14404 %4 = sext <4 x i1> %3 to <4 x i64>
14408 define <4 x i64> @ugt_31_v4i64(<4 x i64> %0) {
14409 ; AVX1-LABEL: ugt_31_v4i64:
14411 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14412 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14413 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14414 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14415 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14416 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14417 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14418 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14419 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14420 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14421 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14422 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14423 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14424 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14425 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14426 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14427 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14428 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14429 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [31,31]
14430 ; AVX1-NEXT: # xmm1 = mem[0,0]
14431 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
14432 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
14433 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14436 ; AVX2-LABEL: ugt_31_v4i64:
14438 ; AVX2-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]
14439 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14440 ; AVX2-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]
14441 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14442 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14443 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14444 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14445 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14446 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14447 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14448 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14449 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [31,31,31,31]
14450 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14453 ; AVX512VPOPCNTDQ-LABEL: ugt_31_v4i64:
14454 ; AVX512VPOPCNTDQ: # %bb.0:
14455 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14456 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14457 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [31,31,31,31]
14458 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14459 ; AVX512VPOPCNTDQ-NEXT: retq
14461 ; AVX512VPOPCNTDQVL-LABEL: ugt_31_v4i64:
14462 ; AVX512VPOPCNTDQVL: # %bb.0:
14463 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14464 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [31,31,31,31]
14465 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14466 ; AVX512VPOPCNTDQVL-NEXT: retq
14468 ; BITALG_NOVLX-LABEL: ugt_31_v4i64:
14469 ; BITALG_NOVLX: # %bb.0:
14470 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14471 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14472 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14473 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14474 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [31,31,31,31]
14475 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14476 ; BITALG_NOVLX-NEXT: retq
14478 ; BITALG-LABEL: ugt_31_v4i64:
14480 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14481 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14482 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14483 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [31,31,31,31]
14484 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14485 ; BITALG-NEXT: retq
14486 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14487 %3 = icmp ugt <4 x i64> %2, <i64 31, i64 31, i64 31, i64 31>
14488 %4 = sext <4 x i1> %3 to <4 x i64>
14492 define <4 x i64> @ult_32_v4i64(<4 x i64> %0) {
14493 ; AVX1-LABEL: ult_32_v4i64:
14495 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14496 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14497 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14498 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14499 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14500 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14501 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14502 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14503 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14504 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14505 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14506 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14507 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14508 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14509 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14510 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14511 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14512 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14513 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [32,32]
14514 ; AVX1-NEXT: # xmm1 = mem[0,0]
14515 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
14516 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
14517 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14520 ; AVX2-LABEL: ult_32_v4i64:
14522 ; AVX2-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]
14523 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14524 ; AVX2-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]
14525 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14526 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14527 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14528 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14529 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14530 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14531 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14532 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14533 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [32,32,32,32]
14534 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14537 ; AVX512VPOPCNTDQ-LABEL: ult_32_v4i64:
14538 ; AVX512VPOPCNTDQ: # %bb.0:
14539 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14540 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14541 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [32,32,32,32]
14542 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14543 ; AVX512VPOPCNTDQ-NEXT: retq
14545 ; AVX512VPOPCNTDQVL-LABEL: ult_32_v4i64:
14546 ; AVX512VPOPCNTDQVL: # %bb.0:
14547 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14548 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [32,32,32,32]
14549 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14550 ; AVX512VPOPCNTDQVL-NEXT: retq
14552 ; BITALG_NOVLX-LABEL: ult_32_v4i64:
14553 ; BITALG_NOVLX: # %bb.0:
14554 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14555 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14556 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14557 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14558 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [32,32,32,32]
14559 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14560 ; BITALG_NOVLX-NEXT: retq
14562 ; BITALG-LABEL: ult_32_v4i64:
14564 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14565 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14566 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14567 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [32,32,32,32]
14568 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14569 ; BITALG-NEXT: retq
14570 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14571 %3 = icmp ult <4 x i64> %2, <i64 32, i64 32, i64 32, i64 32>
14572 %4 = sext <4 x i1> %3 to <4 x i64>
14576 define <4 x i64> @ugt_32_v4i64(<4 x i64> %0) {
14577 ; AVX1-LABEL: ugt_32_v4i64:
14579 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14580 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14581 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14582 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14583 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14584 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14585 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14586 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14587 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14588 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14589 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14590 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14591 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14592 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14593 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14594 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14595 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14596 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14597 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [32,32]
14598 ; AVX1-NEXT: # xmm1 = mem[0,0]
14599 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
14600 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
14601 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14604 ; AVX2-LABEL: ugt_32_v4i64:
14606 ; AVX2-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]
14607 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14608 ; AVX2-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]
14609 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14610 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14611 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14612 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14613 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14614 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14615 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14616 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14617 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [32,32,32,32]
14618 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14621 ; AVX512VPOPCNTDQ-LABEL: ugt_32_v4i64:
14622 ; AVX512VPOPCNTDQ: # %bb.0:
14623 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14624 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14625 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [32,32,32,32]
14626 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14627 ; AVX512VPOPCNTDQ-NEXT: retq
14629 ; AVX512VPOPCNTDQVL-LABEL: ugt_32_v4i64:
14630 ; AVX512VPOPCNTDQVL: # %bb.0:
14631 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14632 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [32,32,32,32]
14633 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14634 ; AVX512VPOPCNTDQVL-NEXT: retq
14636 ; BITALG_NOVLX-LABEL: ugt_32_v4i64:
14637 ; BITALG_NOVLX: # %bb.0:
14638 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14639 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14640 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14641 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14642 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [32,32,32,32]
14643 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14644 ; BITALG_NOVLX-NEXT: retq
14646 ; BITALG-LABEL: ugt_32_v4i64:
14648 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14649 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14650 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14651 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [32,32,32,32]
14652 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14653 ; BITALG-NEXT: retq
14654 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14655 %3 = icmp ugt <4 x i64> %2, <i64 32, i64 32, i64 32, i64 32>
14656 %4 = sext <4 x i1> %3 to <4 x i64>
14660 define <4 x i64> @ult_33_v4i64(<4 x i64> %0) {
14661 ; AVX1-LABEL: ult_33_v4i64:
14663 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14664 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14665 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14666 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14667 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14668 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14669 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14670 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14671 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14672 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14673 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14674 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14675 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14676 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14677 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14678 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14679 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14680 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14681 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [33,33]
14682 ; AVX1-NEXT: # xmm1 = mem[0,0]
14683 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
14684 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
14685 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14688 ; AVX2-LABEL: ult_33_v4i64:
14690 ; AVX2-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]
14691 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14692 ; AVX2-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]
14693 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14694 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14695 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14696 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14697 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14698 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14699 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14700 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14701 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [33,33,33,33]
14702 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14705 ; AVX512VPOPCNTDQ-LABEL: ult_33_v4i64:
14706 ; AVX512VPOPCNTDQ: # %bb.0:
14707 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14708 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14709 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [33,33,33,33]
14710 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14711 ; AVX512VPOPCNTDQ-NEXT: retq
14713 ; AVX512VPOPCNTDQVL-LABEL: ult_33_v4i64:
14714 ; AVX512VPOPCNTDQVL: # %bb.0:
14715 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14716 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [33,33,33,33]
14717 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14718 ; AVX512VPOPCNTDQVL-NEXT: retq
14720 ; BITALG_NOVLX-LABEL: ult_33_v4i64:
14721 ; BITALG_NOVLX: # %bb.0:
14722 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14723 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14724 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14725 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14726 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [33,33,33,33]
14727 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14728 ; BITALG_NOVLX-NEXT: retq
14730 ; BITALG-LABEL: ult_33_v4i64:
14732 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14733 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14734 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14735 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [33,33,33,33]
14736 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14737 ; BITALG-NEXT: retq
14738 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14739 %3 = icmp ult <4 x i64> %2, <i64 33, i64 33, i64 33, i64 33>
14740 %4 = sext <4 x i1> %3 to <4 x i64>
14744 define <4 x i64> @ugt_33_v4i64(<4 x i64> %0) {
14745 ; AVX1-LABEL: ugt_33_v4i64:
14747 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14748 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14749 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14750 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14751 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14752 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14753 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14754 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14755 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14756 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14757 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14758 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14759 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14760 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14761 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14762 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14763 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14764 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14765 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [33,33]
14766 ; AVX1-NEXT: # xmm1 = mem[0,0]
14767 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
14768 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
14769 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14772 ; AVX2-LABEL: ugt_33_v4i64:
14774 ; AVX2-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]
14775 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14776 ; AVX2-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]
14777 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14778 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14779 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14780 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14781 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14782 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14783 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14784 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14785 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [33,33,33,33]
14786 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14789 ; AVX512VPOPCNTDQ-LABEL: ugt_33_v4i64:
14790 ; AVX512VPOPCNTDQ: # %bb.0:
14791 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14792 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14793 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [33,33,33,33]
14794 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14795 ; AVX512VPOPCNTDQ-NEXT: retq
14797 ; AVX512VPOPCNTDQVL-LABEL: ugt_33_v4i64:
14798 ; AVX512VPOPCNTDQVL: # %bb.0:
14799 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14800 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [33,33,33,33]
14801 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14802 ; AVX512VPOPCNTDQVL-NEXT: retq
14804 ; BITALG_NOVLX-LABEL: ugt_33_v4i64:
14805 ; BITALG_NOVLX: # %bb.0:
14806 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14807 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14808 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14809 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14810 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [33,33,33,33]
14811 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14812 ; BITALG_NOVLX-NEXT: retq
14814 ; BITALG-LABEL: ugt_33_v4i64:
14816 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14817 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14818 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14819 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [33,33,33,33]
14820 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14821 ; BITALG-NEXT: retq
14822 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14823 %3 = icmp ugt <4 x i64> %2, <i64 33, i64 33, i64 33, i64 33>
14824 %4 = sext <4 x i1> %3 to <4 x i64>
14828 define <4 x i64> @ult_34_v4i64(<4 x i64> %0) {
14829 ; AVX1-LABEL: ult_34_v4i64:
14831 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14832 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14833 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14834 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14835 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14836 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14837 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14838 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14839 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14840 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14841 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14842 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14843 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14844 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14845 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14846 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14847 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14848 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14849 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [34,34]
14850 ; AVX1-NEXT: # xmm1 = mem[0,0]
14851 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
14852 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
14853 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14856 ; AVX2-LABEL: ult_34_v4i64:
14858 ; AVX2-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]
14859 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14860 ; AVX2-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]
14861 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14862 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14863 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14864 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14865 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14866 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14867 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14868 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14869 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [34,34,34,34]
14870 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14873 ; AVX512VPOPCNTDQ-LABEL: ult_34_v4i64:
14874 ; AVX512VPOPCNTDQ: # %bb.0:
14875 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14876 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14877 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [34,34,34,34]
14878 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14879 ; AVX512VPOPCNTDQ-NEXT: retq
14881 ; AVX512VPOPCNTDQVL-LABEL: ult_34_v4i64:
14882 ; AVX512VPOPCNTDQVL: # %bb.0:
14883 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14884 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [34,34,34,34]
14885 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14886 ; AVX512VPOPCNTDQVL-NEXT: retq
14888 ; BITALG_NOVLX-LABEL: ult_34_v4i64:
14889 ; BITALG_NOVLX: # %bb.0:
14890 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14891 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14892 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14893 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14894 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [34,34,34,34]
14895 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14896 ; BITALG_NOVLX-NEXT: retq
14898 ; BITALG-LABEL: ult_34_v4i64:
14900 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14901 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14902 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14903 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [34,34,34,34]
14904 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
14905 ; BITALG-NEXT: retq
14906 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14907 %3 = icmp ult <4 x i64> %2, <i64 34, i64 34, i64 34, i64 34>
14908 %4 = sext <4 x i1> %3 to <4 x i64>
14912 define <4 x i64> @ugt_34_v4i64(<4 x i64> %0) {
14913 ; AVX1-LABEL: ugt_34_v4i64:
14915 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14916 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
14917 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14918 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
14919 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
14920 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
14921 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
14922 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
14923 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
14924 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
14925 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
14926 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
14927 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
14928 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
14929 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
14930 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
14931 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
14932 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
14933 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [34,34]
14934 ; AVX1-NEXT: # xmm1 = mem[0,0]
14935 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
14936 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
14937 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
14940 ; AVX2-LABEL: ugt_34_v4i64:
14942 ; AVX2-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]
14943 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
14944 ; AVX2-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]
14945 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
14946 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
14947 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
14948 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
14949 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
14950 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
14951 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
14952 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14953 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [34,34,34,34]
14954 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14957 ; AVX512VPOPCNTDQ-LABEL: ugt_34_v4i64:
14958 ; AVX512VPOPCNTDQ: # %bb.0:
14959 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14960 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14961 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [34,34,34,34]
14962 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14963 ; AVX512VPOPCNTDQ-NEXT: retq
14965 ; AVX512VPOPCNTDQVL-LABEL: ugt_34_v4i64:
14966 ; AVX512VPOPCNTDQVL: # %bb.0:
14967 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
14968 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [34,34,34,34]
14969 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14970 ; AVX512VPOPCNTDQVL-NEXT: retq
14972 ; BITALG_NOVLX-LABEL: ugt_34_v4i64:
14973 ; BITALG_NOVLX: # %bb.0:
14974 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
14975 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
14976 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
14977 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14978 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [34,34,34,34]
14979 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14980 ; BITALG_NOVLX-NEXT: retq
14982 ; BITALG-LABEL: ugt_34_v4i64:
14984 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
14985 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14986 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
14987 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [34,34,34,34]
14988 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
14989 ; BITALG-NEXT: retq
14990 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
14991 %3 = icmp ugt <4 x i64> %2, <i64 34, i64 34, i64 34, i64 34>
14992 %4 = sext <4 x i1> %3 to <4 x i64>
14996 define <4 x i64> @ult_35_v4i64(<4 x i64> %0) {
14997 ; AVX1-LABEL: ult_35_v4i64:
14999 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15000 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15001 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15002 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15003 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15004 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15005 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15006 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15007 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15008 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15009 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15010 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15011 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15012 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15013 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15014 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15015 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15016 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15017 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [35,35]
15018 ; AVX1-NEXT: # xmm1 = mem[0,0]
15019 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
15020 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
15021 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15024 ; AVX2-LABEL: ult_35_v4i64:
15026 ; AVX2-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]
15027 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15028 ; AVX2-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]
15029 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15030 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15031 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15032 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15033 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15034 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15035 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15036 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15037 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [35,35,35,35]
15038 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15041 ; AVX512VPOPCNTDQ-LABEL: ult_35_v4i64:
15042 ; AVX512VPOPCNTDQ: # %bb.0:
15043 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15044 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15045 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [35,35,35,35]
15046 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15047 ; AVX512VPOPCNTDQ-NEXT: retq
15049 ; AVX512VPOPCNTDQVL-LABEL: ult_35_v4i64:
15050 ; AVX512VPOPCNTDQVL: # %bb.0:
15051 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15052 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [35,35,35,35]
15053 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15054 ; AVX512VPOPCNTDQVL-NEXT: retq
15056 ; BITALG_NOVLX-LABEL: ult_35_v4i64:
15057 ; BITALG_NOVLX: # %bb.0:
15058 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15059 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15060 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15061 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15062 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [35,35,35,35]
15063 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15064 ; BITALG_NOVLX-NEXT: retq
15066 ; BITALG-LABEL: ult_35_v4i64:
15068 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15069 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15070 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15071 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [35,35,35,35]
15072 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15073 ; BITALG-NEXT: retq
15074 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15075 %3 = icmp ult <4 x i64> %2, <i64 35, i64 35, i64 35, i64 35>
15076 %4 = sext <4 x i1> %3 to <4 x i64>
15080 define <4 x i64> @ugt_35_v4i64(<4 x i64> %0) {
15081 ; AVX1-LABEL: ugt_35_v4i64:
15083 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15084 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15085 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15086 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15087 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15088 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15089 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15090 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15091 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15092 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15093 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15094 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15095 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15096 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15097 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15098 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15099 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15100 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15101 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [35,35]
15102 ; AVX1-NEXT: # xmm1 = mem[0,0]
15103 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
15104 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
15105 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15108 ; AVX2-LABEL: ugt_35_v4i64:
15110 ; AVX2-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]
15111 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15112 ; AVX2-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]
15113 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15114 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15115 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15116 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15117 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15118 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15119 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15120 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15121 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [35,35,35,35]
15122 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15125 ; AVX512VPOPCNTDQ-LABEL: ugt_35_v4i64:
15126 ; AVX512VPOPCNTDQ: # %bb.0:
15127 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15128 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15129 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [35,35,35,35]
15130 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15131 ; AVX512VPOPCNTDQ-NEXT: retq
15133 ; AVX512VPOPCNTDQVL-LABEL: ugt_35_v4i64:
15134 ; AVX512VPOPCNTDQVL: # %bb.0:
15135 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15136 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [35,35,35,35]
15137 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15138 ; AVX512VPOPCNTDQVL-NEXT: retq
15140 ; BITALG_NOVLX-LABEL: ugt_35_v4i64:
15141 ; BITALG_NOVLX: # %bb.0:
15142 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15143 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15144 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15145 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15146 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [35,35,35,35]
15147 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15148 ; BITALG_NOVLX-NEXT: retq
15150 ; BITALG-LABEL: ugt_35_v4i64:
15152 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15153 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15154 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15155 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [35,35,35,35]
15156 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15157 ; BITALG-NEXT: retq
15158 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15159 %3 = icmp ugt <4 x i64> %2, <i64 35, i64 35, i64 35, i64 35>
15160 %4 = sext <4 x i1> %3 to <4 x i64>
15164 define <4 x i64> @ult_36_v4i64(<4 x i64> %0) {
15165 ; AVX1-LABEL: ult_36_v4i64:
15167 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15168 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15169 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15170 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15171 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15172 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15173 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15174 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15175 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15176 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15177 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15178 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15179 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15180 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15181 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15182 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15183 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15184 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15185 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [36,36]
15186 ; AVX1-NEXT: # xmm1 = mem[0,0]
15187 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
15188 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
15189 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15192 ; AVX2-LABEL: ult_36_v4i64:
15194 ; AVX2-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]
15195 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15196 ; AVX2-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]
15197 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15198 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15199 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15200 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15201 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15202 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15203 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15204 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15205 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [36,36,36,36]
15206 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15209 ; AVX512VPOPCNTDQ-LABEL: ult_36_v4i64:
15210 ; AVX512VPOPCNTDQ: # %bb.0:
15211 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15212 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15213 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [36,36,36,36]
15214 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15215 ; AVX512VPOPCNTDQ-NEXT: retq
15217 ; AVX512VPOPCNTDQVL-LABEL: ult_36_v4i64:
15218 ; AVX512VPOPCNTDQVL: # %bb.0:
15219 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15220 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [36,36,36,36]
15221 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15222 ; AVX512VPOPCNTDQVL-NEXT: retq
15224 ; BITALG_NOVLX-LABEL: ult_36_v4i64:
15225 ; BITALG_NOVLX: # %bb.0:
15226 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15227 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15228 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15229 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15230 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [36,36,36,36]
15231 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15232 ; BITALG_NOVLX-NEXT: retq
15234 ; BITALG-LABEL: ult_36_v4i64:
15236 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15237 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15238 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15239 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [36,36,36,36]
15240 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15241 ; BITALG-NEXT: retq
15242 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15243 %3 = icmp ult <4 x i64> %2, <i64 36, i64 36, i64 36, i64 36>
15244 %4 = sext <4 x i1> %3 to <4 x i64>
15248 define <4 x i64> @ugt_36_v4i64(<4 x i64> %0) {
15249 ; AVX1-LABEL: ugt_36_v4i64:
15251 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15252 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15253 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15254 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15255 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15256 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15257 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15258 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15259 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15260 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15261 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15262 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15263 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15264 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15265 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15266 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15267 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15268 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15269 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [36,36]
15270 ; AVX1-NEXT: # xmm1 = mem[0,0]
15271 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
15272 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
15273 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15276 ; AVX2-LABEL: ugt_36_v4i64:
15278 ; AVX2-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]
15279 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15280 ; AVX2-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]
15281 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15282 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15283 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15284 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15285 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15286 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15287 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15288 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15289 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [36,36,36,36]
15290 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15293 ; AVX512VPOPCNTDQ-LABEL: ugt_36_v4i64:
15294 ; AVX512VPOPCNTDQ: # %bb.0:
15295 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15296 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15297 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [36,36,36,36]
15298 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15299 ; AVX512VPOPCNTDQ-NEXT: retq
15301 ; AVX512VPOPCNTDQVL-LABEL: ugt_36_v4i64:
15302 ; AVX512VPOPCNTDQVL: # %bb.0:
15303 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15304 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [36,36,36,36]
15305 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15306 ; AVX512VPOPCNTDQVL-NEXT: retq
15308 ; BITALG_NOVLX-LABEL: ugt_36_v4i64:
15309 ; BITALG_NOVLX: # %bb.0:
15310 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15311 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15312 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15313 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15314 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [36,36,36,36]
15315 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15316 ; BITALG_NOVLX-NEXT: retq
15318 ; BITALG-LABEL: ugt_36_v4i64:
15320 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15321 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15322 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15323 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [36,36,36,36]
15324 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15325 ; BITALG-NEXT: retq
15326 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15327 %3 = icmp ugt <4 x i64> %2, <i64 36, i64 36, i64 36, i64 36>
15328 %4 = sext <4 x i1> %3 to <4 x i64>
15332 define <4 x i64> @ult_37_v4i64(<4 x i64> %0) {
15333 ; AVX1-LABEL: ult_37_v4i64:
15335 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15336 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15337 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15338 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15339 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15340 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15341 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15342 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15343 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15344 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15345 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15346 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15347 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15348 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15349 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15350 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15351 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15352 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15353 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [37,37]
15354 ; AVX1-NEXT: # xmm1 = mem[0,0]
15355 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
15356 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
15357 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15360 ; AVX2-LABEL: ult_37_v4i64:
15362 ; AVX2-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]
15363 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15364 ; AVX2-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]
15365 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15366 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15367 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15368 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15369 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15370 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15371 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15372 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15373 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [37,37,37,37]
15374 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15377 ; AVX512VPOPCNTDQ-LABEL: ult_37_v4i64:
15378 ; AVX512VPOPCNTDQ: # %bb.0:
15379 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15380 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15381 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [37,37,37,37]
15382 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15383 ; AVX512VPOPCNTDQ-NEXT: retq
15385 ; AVX512VPOPCNTDQVL-LABEL: ult_37_v4i64:
15386 ; AVX512VPOPCNTDQVL: # %bb.0:
15387 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15388 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [37,37,37,37]
15389 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15390 ; AVX512VPOPCNTDQVL-NEXT: retq
15392 ; BITALG_NOVLX-LABEL: ult_37_v4i64:
15393 ; BITALG_NOVLX: # %bb.0:
15394 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15395 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15396 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15397 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15398 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [37,37,37,37]
15399 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15400 ; BITALG_NOVLX-NEXT: retq
15402 ; BITALG-LABEL: ult_37_v4i64:
15404 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15405 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15406 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15407 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [37,37,37,37]
15408 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15409 ; BITALG-NEXT: retq
15410 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15411 %3 = icmp ult <4 x i64> %2, <i64 37, i64 37, i64 37, i64 37>
15412 %4 = sext <4 x i1> %3 to <4 x i64>
15416 define <4 x i64> @ugt_37_v4i64(<4 x i64> %0) {
15417 ; AVX1-LABEL: ugt_37_v4i64:
15419 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15420 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15421 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15422 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15423 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15424 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15425 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15426 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15427 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15428 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15429 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15430 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15431 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15432 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15433 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15434 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15435 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15436 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15437 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [37,37]
15438 ; AVX1-NEXT: # xmm1 = mem[0,0]
15439 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
15440 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
15441 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15444 ; AVX2-LABEL: ugt_37_v4i64:
15446 ; AVX2-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]
15447 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15448 ; AVX2-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]
15449 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15450 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15451 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15452 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15453 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15454 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15455 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15456 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15457 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [37,37,37,37]
15458 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15461 ; AVX512VPOPCNTDQ-LABEL: ugt_37_v4i64:
15462 ; AVX512VPOPCNTDQ: # %bb.0:
15463 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15464 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15465 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [37,37,37,37]
15466 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15467 ; AVX512VPOPCNTDQ-NEXT: retq
15469 ; AVX512VPOPCNTDQVL-LABEL: ugt_37_v4i64:
15470 ; AVX512VPOPCNTDQVL: # %bb.0:
15471 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15472 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [37,37,37,37]
15473 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15474 ; AVX512VPOPCNTDQVL-NEXT: retq
15476 ; BITALG_NOVLX-LABEL: ugt_37_v4i64:
15477 ; BITALG_NOVLX: # %bb.0:
15478 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15479 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15480 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15481 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15482 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [37,37,37,37]
15483 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15484 ; BITALG_NOVLX-NEXT: retq
15486 ; BITALG-LABEL: ugt_37_v4i64:
15488 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15489 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15490 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15491 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [37,37,37,37]
15492 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15493 ; BITALG-NEXT: retq
15494 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15495 %3 = icmp ugt <4 x i64> %2, <i64 37, i64 37, i64 37, i64 37>
15496 %4 = sext <4 x i1> %3 to <4 x i64>
15500 define <4 x i64> @ult_38_v4i64(<4 x i64> %0) {
15501 ; AVX1-LABEL: ult_38_v4i64:
15503 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15504 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15505 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15506 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15507 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15508 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15509 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15510 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15511 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15512 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15513 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15514 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15515 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15516 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15517 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15518 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15519 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15520 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15521 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [38,38]
15522 ; AVX1-NEXT: # xmm1 = mem[0,0]
15523 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
15524 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
15525 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15528 ; AVX2-LABEL: ult_38_v4i64:
15530 ; AVX2-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]
15531 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15532 ; AVX2-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]
15533 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15534 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15535 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15536 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15537 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15538 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15539 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15540 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15541 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [38,38,38,38]
15542 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15545 ; AVX512VPOPCNTDQ-LABEL: ult_38_v4i64:
15546 ; AVX512VPOPCNTDQ: # %bb.0:
15547 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15548 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15549 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [38,38,38,38]
15550 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15551 ; AVX512VPOPCNTDQ-NEXT: retq
15553 ; AVX512VPOPCNTDQVL-LABEL: ult_38_v4i64:
15554 ; AVX512VPOPCNTDQVL: # %bb.0:
15555 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15556 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [38,38,38,38]
15557 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15558 ; AVX512VPOPCNTDQVL-NEXT: retq
15560 ; BITALG_NOVLX-LABEL: ult_38_v4i64:
15561 ; BITALG_NOVLX: # %bb.0:
15562 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15563 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15564 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15565 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15566 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [38,38,38,38]
15567 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15568 ; BITALG_NOVLX-NEXT: retq
15570 ; BITALG-LABEL: ult_38_v4i64:
15572 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15573 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15574 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15575 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [38,38,38,38]
15576 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15577 ; BITALG-NEXT: retq
15578 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15579 %3 = icmp ult <4 x i64> %2, <i64 38, i64 38, i64 38, i64 38>
15580 %4 = sext <4 x i1> %3 to <4 x i64>
15584 define <4 x i64> @ugt_38_v4i64(<4 x i64> %0) {
15585 ; AVX1-LABEL: ugt_38_v4i64:
15587 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15588 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15589 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15590 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15591 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15592 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15593 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15594 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15595 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15596 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15597 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15598 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15599 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15600 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15601 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15602 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15603 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15604 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15605 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [38,38]
15606 ; AVX1-NEXT: # xmm1 = mem[0,0]
15607 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
15608 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
15609 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15612 ; AVX2-LABEL: ugt_38_v4i64:
15614 ; AVX2-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]
15615 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15616 ; AVX2-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]
15617 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15618 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15619 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15620 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15621 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15622 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15623 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15624 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15625 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [38,38,38,38]
15626 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15629 ; AVX512VPOPCNTDQ-LABEL: ugt_38_v4i64:
15630 ; AVX512VPOPCNTDQ: # %bb.0:
15631 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15632 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15633 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [38,38,38,38]
15634 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15635 ; AVX512VPOPCNTDQ-NEXT: retq
15637 ; AVX512VPOPCNTDQVL-LABEL: ugt_38_v4i64:
15638 ; AVX512VPOPCNTDQVL: # %bb.0:
15639 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15640 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [38,38,38,38]
15641 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15642 ; AVX512VPOPCNTDQVL-NEXT: retq
15644 ; BITALG_NOVLX-LABEL: ugt_38_v4i64:
15645 ; BITALG_NOVLX: # %bb.0:
15646 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15647 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15648 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15649 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15650 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [38,38,38,38]
15651 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15652 ; BITALG_NOVLX-NEXT: retq
15654 ; BITALG-LABEL: ugt_38_v4i64:
15656 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15657 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15658 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15659 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [38,38,38,38]
15660 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15661 ; BITALG-NEXT: retq
15662 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15663 %3 = icmp ugt <4 x i64> %2, <i64 38, i64 38, i64 38, i64 38>
15664 %4 = sext <4 x i1> %3 to <4 x i64>
15668 define <4 x i64> @ult_39_v4i64(<4 x i64> %0) {
15669 ; AVX1-LABEL: ult_39_v4i64:
15671 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15672 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15673 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15674 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15675 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15676 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15677 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15678 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15679 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15680 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15681 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15682 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15683 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15684 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15685 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15686 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15687 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15688 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15689 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [39,39]
15690 ; AVX1-NEXT: # xmm1 = mem[0,0]
15691 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
15692 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
15693 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15696 ; AVX2-LABEL: ult_39_v4i64:
15698 ; AVX2-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]
15699 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15700 ; AVX2-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]
15701 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15702 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15703 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15704 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15705 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15706 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15707 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15708 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15709 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [39,39,39,39]
15710 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15713 ; AVX512VPOPCNTDQ-LABEL: ult_39_v4i64:
15714 ; AVX512VPOPCNTDQ: # %bb.0:
15715 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15716 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15717 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [39,39,39,39]
15718 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15719 ; AVX512VPOPCNTDQ-NEXT: retq
15721 ; AVX512VPOPCNTDQVL-LABEL: ult_39_v4i64:
15722 ; AVX512VPOPCNTDQVL: # %bb.0:
15723 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15724 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [39,39,39,39]
15725 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15726 ; AVX512VPOPCNTDQVL-NEXT: retq
15728 ; BITALG_NOVLX-LABEL: ult_39_v4i64:
15729 ; BITALG_NOVLX: # %bb.0:
15730 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15731 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15732 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15733 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15734 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [39,39,39,39]
15735 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15736 ; BITALG_NOVLX-NEXT: retq
15738 ; BITALG-LABEL: ult_39_v4i64:
15740 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15741 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15742 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15743 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [39,39,39,39]
15744 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15745 ; BITALG-NEXT: retq
15746 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15747 %3 = icmp ult <4 x i64> %2, <i64 39, i64 39, i64 39, i64 39>
15748 %4 = sext <4 x i1> %3 to <4 x i64>
15752 define <4 x i64> @ugt_39_v4i64(<4 x i64> %0) {
15753 ; AVX1-LABEL: ugt_39_v4i64:
15755 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15756 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15757 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15758 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15759 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15760 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15761 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15762 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15763 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15764 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15765 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15766 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15767 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15768 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15769 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15770 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15771 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15772 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15773 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [39,39]
15774 ; AVX1-NEXT: # xmm1 = mem[0,0]
15775 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
15776 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
15777 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15780 ; AVX2-LABEL: ugt_39_v4i64:
15782 ; AVX2-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]
15783 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15784 ; AVX2-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]
15785 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15786 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15787 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15788 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15789 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15790 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15791 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15792 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15793 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [39,39,39,39]
15794 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15797 ; AVX512VPOPCNTDQ-LABEL: ugt_39_v4i64:
15798 ; AVX512VPOPCNTDQ: # %bb.0:
15799 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15800 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15801 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [39,39,39,39]
15802 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15803 ; AVX512VPOPCNTDQ-NEXT: retq
15805 ; AVX512VPOPCNTDQVL-LABEL: ugt_39_v4i64:
15806 ; AVX512VPOPCNTDQVL: # %bb.0:
15807 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15808 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [39,39,39,39]
15809 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15810 ; AVX512VPOPCNTDQVL-NEXT: retq
15812 ; BITALG_NOVLX-LABEL: ugt_39_v4i64:
15813 ; BITALG_NOVLX: # %bb.0:
15814 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15815 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15816 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15817 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15818 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [39,39,39,39]
15819 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15820 ; BITALG_NOVLX-NEXT: retq
15822 ; BITALG-LABEL: ugt_39_v4i64:
15824 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15825 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15826 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15827 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [39,39,39,39]
15828 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15829 ; BITALG-NEXT: retq
15830 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15831 %3 = icmp ugt <4 x i64> %2, <i64 39, i64 39, i64 39, i64 39>
15832 %4 = sext <4 x i1> %3 to <4 x i64>
15836 define <4 x i64> @ult_40_v4i64(<4 x i64> %0) {
15837 ; AVX1-LABEL: ult_40_v4i64:
15839 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15840 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15841 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15842 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15843 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15844 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15845 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15846 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15847 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15848 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15849 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15850 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15851 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15852 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15853 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15854 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15855 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15856 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15857 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [40,40]
15858 ; AVX1-NEXT: # xmm1 = mem[0,0]
15859 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
15860 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
15861 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15864 ; AVX2-LABEL: ult_40_v4i64:
15866 ; AVX2-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]
15867 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15868 ; AVX2-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]
15869 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15870 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15871 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15872 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15873 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15874 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15875 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15876 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15877 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [40,40,40,40]
15878 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15881 ; AVX512VPOPCNTDQ-LABEL: ult_40_v4i64:
15882 ; AVX512VPOPCNTDQ: # %bb.0:
15883 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15884 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15885 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [40,40,40,40]
15886 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15887 ; AVX512VPOPCNTDQ-NEXT: retq
15889 ; AVX512VPOPCNTDQVL-LABEL: ult_40_v4i64:
15890 ; AVX512VPOPCNTDQVL: # %bb.0:
15891 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15892 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [40,40,40,40]
15893 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15894 ; AVX512VPOPCNTDQVL-NEXT: retq
15896 ; BITALG_NOVLX-LABEL: ult_40_v4i64:
15897 ; BITALG_NOVLX: # %bb.0:
15898 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15899 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15900 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15901 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15902 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [40,40,40,40]
15903 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15904 ; BITALG_NOVLX-NEXT: retq
15906 ; BITALG-LABEL: ult_40_v4i64:
15908 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15909 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15910 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15911 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [40,40,40,40]
15912 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
15913 ; BITALG-NEXT: retq
15914 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15915 %3 = icmp ult <4 x i64> %2, <i64 40, i64 40, i64 40, i64 40>
15916 %4 = sext <4 x i1> %3 to <4 x i64>
15920 define <4 x i64> @ugt_40_v4i64(<4 x i64> %0) {
15921 ; AVX1-LABEL: ugt_40_v4i64:
15923 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15924 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
15925 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15926 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
15927 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
15928 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
15929 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
15930 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
15931 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
15932 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
15933 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
15934 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
15935 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
15936 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
15937 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
15938 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
15939 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
15940 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
15941 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [40,40]
15942 ; AVX1-NEXT: # xmm1 = mem[0,0]
15943 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
15944 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
15945 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
15948 ; AVX2-LABEL: ugt_40_v4i64:
15950 ; AVX2-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]
15951 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
15952 ; AVX2-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]
15953 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
15954 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
15955 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
15956 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
15957 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
15958 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
15959 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
15960 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15961 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [40,40,40,40]
15962 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15965 ; AVX512VPOPCNTDQ-LABEL: ugt_40_v4i64:
15966 ; AVX512VPOPCNTDQ: # %bb.0:
15967 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15968 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15969 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [40,40,40,40]
15970 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15971 ; AVX512VPOPCNTDQ-NEXT: retq
15973 ; AVX512VPOPCNTDQVL-LABEL: ugt_40_v4i64:
15974 ; AVX512VPOPCNTDQVL: # %bb.0:
15975 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
15976 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [40,40,40,40]
15977 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15978 ; AVX512VPOPCNTDQVL-NEXT: retq
15980 ; BITALG_NOVLX-LABEL: ugt_40_v4i64:
15981 ; BITALG_NOVLX: # %bb.0:
15982 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
15983 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
15984 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
15985 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15986 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [40,40,40,40]
15987 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15988 ; BITALG_NOVLX-NEXT: retq
15990 ; BITALG-LABEL: ugt_40_v4i64:
15992 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
15993 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15994 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
15995 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [40,40,40,40]
15996 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
15997 ; BITALG-NEXT: retq
15998 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
15999 %3 = icmp ugt <4 x i64> %2, <i64 40, i64 40, i64 40, i64 40>
16000 %4 = sext <4 x i1> %3 to <4 x i64>
16004 define <4 x i64> @ult_41_v4i64(<4 x i64> %0) {
16005 ; AVX1-LABEL: ult_41_v4i64:
16007 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16008 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16009 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16010 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16011 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16012 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16013 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16014 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16015 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16016 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16017 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16018 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16019 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16020 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16021 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16022 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16023 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16024 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16025 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [41,41]
16026 ; AVX1-NEXT: # xmm1 = mem[0,0]
16027 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
16028 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
16029 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16032 ; AVX2-LABEL: ult_41_v4i64:
16034 ; AVX2-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]
16035 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16036 ; AVX2-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]
16037 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16038 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16039 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16040 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16041 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16042 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16043 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16044 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16045 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [41,41,41,41]
16046 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16049 ; AVX512VPOPCNTDQ-LABEL: ult_41_v4i64:
16050 ; AVX512VPOPCNTDQ: # %bb.0:
16051 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16052 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16053 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [41,41,41,41]
16054 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16055 ; AVX512VPOPCNTDQ-NEXT: retq
16057 ; AVX512VPOPCNTDQVL-LABEL: ult_41_v4i64:
16058 ; AVX512VPOPCNTDQVL: # %bb.0:
16059 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16060 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [41,41,41,41]
16061 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16062 ; AVX512VPOPCNTDQVL-NEXT: retq
16064 ; BITALG_NOVLX-LABEL: ult_41_v4i64:
16065 ; BITALG_NOVLX: # %bb.0:
16066 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16067 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16068 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16069 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16070 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [41,41,41,41]
16071 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16072 ; BITALG_NOVLX-NEXT: retq
16074 ; BITALG-LABEL: ult_41_v4i64:
16076 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16077 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16078 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16079 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [41,41,41,41]
16080 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16081 ; BITALG-NEXT: retq
16082 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16083 %3 = icmp ult <4 x i64> %2, <i64 41, i64 41, i64 41, i64 41>
16084 %4 = sext <4 x i1> %3 to <4 x i64>
16088 define <4 x i64> @ugt_41_v4i64(<4 x i64> %0) {
16089 ; AVX1-LABEL: ugt_41_v4i64:
16091 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16092 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16093 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16094 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16095 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16096 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16097 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16098 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16099 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16100 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16101 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16102 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16103 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16104 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16105 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16106 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16107 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16108 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16109 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [41,41]
16110 ; AVX1-NEXT: # xmm1 = mem[0,0]
16111 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
16112 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
16113 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16116 ; AVX2-LABEL: ugt_41_v4i64:
16118 ; AVX2-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]
16119 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16120 ; AVX2-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]
16121 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16122 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16123 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16124 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16125 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16126 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16127 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16128 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16129 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [41,41,41,41]
16130 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16133 ; AVX512VPOPCNTDQ-LABEL: ugt_41_v4i64:
16134 ; AVX512VPOPCNTDQ: # %bb.0:
16135 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16136 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16137 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [41,41,41,41]
16138 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16139 ; AVX512VPOPCNTDQ-NEXT: retq
16141 ; AVX512VPOPCNTDQVL-LABEL: ugt_41_v4i64:
16142 ; AVX512VPOPCNTDQVL: # %bb.0:
16143 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16144 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [41,41,41,41]
16145 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16146 ; AVX512VPOPCNTDQVL-NEXT: retq
16148 ; BITALG_NOVLX-LABEL: ugt_41_v4i64:
16149 ; BITALG_NOVLX: # %bb.0:
16150 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16151 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16152 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16153 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16154 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [41,41,41,41]
16155 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16156 ; BITALG_NOVLX-NEXT: retq
16158 ; BITALG-LABEL: ugt_41_v4i64:
16160 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16161 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16162 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16163 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [41,41,41,41]
16164 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16165 ; BITALG-NEXT: retq
16166 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16167 %3 = icmp ugt <4 x i64> %2, <i64 41, i64 41, i64 41, i64 41>
16168 %4 = sext <4 x i1> %3 to <4 x i64>
16172 define <4 x i64> @ult_42_v4i64(<4 x i64> %0) {
16173 ; AVX1-LABEL: ult_42_v4i64:
16175 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16176 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16177 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16178 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16179 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16180 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16181 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16182 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16183 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16184 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16185 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16186 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16187 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16188 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16189 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16190 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16191 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16192 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16193 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [42,42]
16194 ; AVX1-NEXT: # xmm1 = mem[0,0]
16195 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
16196 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
16197 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16200 ; AVX2-LABEL: ult_42_v4i64:
16202 ; AVX2-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]
16203 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16204 ; AVX2-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]
16205 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16206 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16207 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16208 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16209 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16210 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16211 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16212 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16213 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [42,42,42,42]
16214 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16217 ; AVX512VPOPCNTDQ-LABEL: ult_42_v4i64:
16218 ; AVX512VPOPCNTDQ: # %bb.0:
16219 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16220 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16221 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [42,42,42,42]
16222 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16223 ; AVX512VPOPCNTDQ-NEXT: retq
16225 ; AVX512VPOPCNTDQVL-LABEL: ult_42_v4i64:
16226 ; AVX512VPOPCNTDQVL: # %bb.0:
16227 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16228 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [42,42,42,42]
16229 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16230 ; AVX512VPOPCNTDQVL-NEXT: retq
16232 ; BITALG_NOVLX-LABEL: ult_42_v4i64:
16233 ; BITALG_NOVLX: # %bb.0:
16234 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16235 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16236 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16237 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16238 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [42,42,42,42]
16239 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16240 ; BITALG_NOVLX-NEXT: retq
16242 ; BITALG-LABEL: ult_42_v4i64:
16244 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16245 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16246 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16247 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [42,42,42,42]
16248 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16249 ; BITALG-NEXT: retq
16250 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16251 %3 = icmp ult <4 x i64> %2, <i64 42, i64 42, i64 42, i64 42>
16252 %4 = sext <4 x i1> %3 to <4 x i64>
16256 define <4 x i64> @ugt_42_v4i64(<4 x i64> %0) {
16257 ; AVX1-LABEL: ugt_42_v4i64:
16259 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16260 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16261 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16262 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16263 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16264 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16265 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16266 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16267 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16268 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16269 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16270 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16271 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16272 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16273 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16274 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16275 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16276 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16277 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [42,42]
16278 ; AVX1-NEXT: # xmm1 = mem[0,0]
16279 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
16280 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
16281 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16284 ; AVX2-LABEL: ugt_42_v4i64:
16286 ; AVX2-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]
16287 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16288 ; AVX2-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]
16289 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16290 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16291 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16292 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16293 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16294 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16295 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16296 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16297 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [42,42,42,42]
16298 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16301 ; AVX512VPOPCNTDQ-LABEL: ugt_42_v4i64:
16302 ; AVX512VPOPCNTDQ: # %bb.0:
16303 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16304 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16305 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [42,42,42,42]
16306 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16307 ; AVX512VPOPCNTDQ-NEXT: retq
16309 ; AVX512VPOPCNTDQVL-LABEL: ugt_42_v4i64:
16310 ; AVX512VPOPCNTDQVL: # %bb.0:
16311 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16312 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [42,42,42,42]
16313 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16314 ; AVX512VPOPCNTDQVL-NEXT: retq
16316 ; BITALG_NOVLX-LABEL: ugt_42_v4i64:
16317 ; BITALG_NOVLX: # %bb.0:
16318 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16319 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16320 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16321 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16322 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [42,42,42,42]
16323 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16324 ; BITALG_NOVLX-NEXT: retq
16326 ; BITALG-LABEL: ugt_42_v4i64:
16328 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16329 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16330 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16331 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [42,42,42,42]
16332 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16333 ; BITALG-NEXT: retq
16334 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16335 %3 = icmp ugt <4 x i64> %2, <i64 42, i64 42, i64 42, i64 42>
16336 %4 = sext <4 x i1> %3 to <4 x i64>
16340 define <4 x i64> @ult_43_v4i64(<4 x i64> %0) {
16341 ; AVX1-LABEL: ult_43_v4i64:
16343 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16344 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16345 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16346 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16347 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16348 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16349 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16350 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16351 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16352 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16353 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16354 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16355 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16356 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16357 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16358 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16359 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16360 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16361 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [43,43]
16362 ; AVX1-NEXT: # xmm1 = mem[0,0]
16363 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
16364 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
16365 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16368 ; AVX2-LABEL: ult_43_v4i64:
16370 ; AVX2-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]
16371 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16372 ; AVX2-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]
16373 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16374 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16375 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16376 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16377 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16378 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16379 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16380 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16381 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [43,43,43,43]
16382 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16385 ; AVX512VPOPCNTDQ-LABEL: ult_43_v4i64:
16386 ; AVX512VPOPCNTDQ: # %bb.0:
16387 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16388 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16389 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [43,43,43,43]
16390 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16391 ; AVX512VPOPCNTDQ-NEXT: retq
16393 ; AVX512VPOPCNTDQVL-LABEL: ult_43_v4i64:
16394 ; AVX512VPOPCNTDQVL: # %bb.0:
16395 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16396 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [43,43,43,43]
16397 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16398 ; AVX512VPOPCNTDQVL-NEXT: retq
16400 ; BITALG_NOVLX-LABEL: ult_43_v4i64:
16401 ; BITALG_NOVLX: # %bb.0:
16402 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16403 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16404 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16405 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16406 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [43,43,43,43]
16407 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16408 ; BITALG_NOVLX-NEXT: retq
16410 ; BITALG-LABEL: ult_43_v4i64:
16412 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16413 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16414 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16415 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [43,43,43,43]
16416 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16417 ; BITALG-NEXT: retq
16418 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16419 %3 = icmp ult <4 x i64> %2, <i64 43, i64 43, i64 43, i64 43>
16420 %4 = sext <4 x i1> %3 to <4 x i64>
16424 define <4 x i64> @ugt_43_v4i64(<4 x i64> %0) {
16425 ; AVX1-LABEL: ugt_43_v4i64:
16427 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16428 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16429 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16430 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16431 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16432 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16433 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16434 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16435 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16436 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16437 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16438 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16439 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16440 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16441 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16442 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16443 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16444 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16445 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [43,43]
16446 ; AVX1-NEXT: # xmm1 = mem[0,0]
16447 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
16448 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
16449 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16452 ; AVX2-LABEL: ugt_43_v4i64:
16454 ; AVX2-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]
16455 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16456 ; AVX2-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]
16457 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16458 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16459 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16460 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16461 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16462 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16463 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16464 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16465 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [43,43,43,43]
16466 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16469 ; AVX512VPOPCNTDQ-LABEL: ugt_43_v4i64:
16470 ; AVX512VPOPCNTDQ: # %bb.0:
16471 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16472 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16473 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [43,43,43,43]
16474 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16475 ; AVX512VPOPCNTDQ-NEXT: retq
16477 ; AVX512VPOPCNTDQVL-LABEL: ugt_43_v4i64:
16478 ; AVX512VPOPCNTDQVL: # %bb.0:
16479 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16480 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [43,43,43,43]
16481 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16482 ; AVX512VPOPCNTDQVL-NEXT: retq
16484 ; BITALG_NOVLX-LABEL: ugt_43_v4i64:
16485 ; BITALG_NOVLX: # %bb.0:
16486 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16487 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16488 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16489 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16490 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [43,43,43,43]
16491 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16492 ; BITALG_NOVLX-NEXT: retq
16494 ; BITALG-LABEL: ugt_43_v4i64:
16496 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16497 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16498 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16499 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [43,43,43,43]
16500 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16501 ; BITALG-NEXT: retq
16502 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16503 %3 = icmp ugt <4 x i64> %2, <i64 43, i64 43, i64 43, i64 43>
16504 %4 = sext <4 x i1> %3 to <4 x i64>
16508 define <4 x i64> @ult_44_v4i64(<4 x i64> %0) {
16509 ; AVX1-LABEL: ult_44_v4i64:
16511 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16512 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16513 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16514 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16515 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16516 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16517 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16518 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16519 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16520 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16521 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16522 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16523 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16524 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16525 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16526 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16527 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16528 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16529 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [44,44]
16530 ; AVX1-NEXT: # xmm1 = mem[0,0]
16531 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
16532 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
16533 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16536 ; AVX2-LABEL: ult_44_v4i64:
16538 ; AVX2-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]
16539 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16540 ; AVX2-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]
16541 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16542 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16543 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16544 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16545 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16546 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16547 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16548 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16549 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [44,44,44,44]
16550 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16553 ; AVX512VPOPCNTDQ-LABEL: ult_44_v4i64:
16554 ; AVX512VPOPCNTDQ: # %bb.0:
16555 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16556 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16557 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [44,44,44,44]
16558 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16559 ; AVX512VPOPCNTDQ-NEXT: retq
16561 ; AVX512VPOPCNTDQVL-LABEL: ult_44_v4i64:
16562 ; AVX512VPOPCNTDQVL: # %bb.0:
16563 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16564 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [44,44,44,44]
16565 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16566 ; AVX512VPOPCNTDQVL-NEXT: retq
16568 ; BITALG_NOVLX-LABEL: ult_44_v4i64:
16569 ; BITALG_NOVLX: # %bb.0:
16570 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16571 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16572 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16573 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16574 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [44,44,44,44]
16575 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16576 ; BITALG_NOVLX-NEXT: retq
16578 ; BITALG-LABEL: ult_44_v4i64:
16580 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16581 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16582 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16583 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [44,44,44,44]
16584 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16585 ; BITALG-NEXT: retq
16586 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16587 %3 = icmp ult <4 x i64> %2, <i64 44, i64 44, i64 44, i64 44>
16588 %4 = sext <4 x i1> %3 to <4 x i64>
16592 define <4 x i64> @ugt_44_v4i64(<4 x i64> %0) {
16593 ; AVX1-LABEL: ugt_44_v4i64:
16595 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16596 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16597 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16598 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16599 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16600 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16601 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16602 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16603 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16604 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16605 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16606 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16607 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16608 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16609 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16610 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16611 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16612 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16613 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [44,44]
16614 ; AVX1-NEXT: # xmm1 = mem[0,0]
16615 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
16616 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
16617 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16620 ; AVX2-LABEL: ugt_44_v4i64:
16622 ; AVX2-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]
16623 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16624 ; AVX2-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]
16625 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16626 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16627 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16628 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16629 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16630 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16631 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16632 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16633 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [44,44,44,44]
16634 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16637 ; AVX512VPOPCNTDQ-LABEL: ugt_44_v4i64:
16638 ; AVX512VPOPCNTDQ: # %bb.0:
16639 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16640 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16641 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [44,44,44,44]
16642 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16643 ; AVX512VPOPCNTDQ-NEXT: retq
16645 ; AVX512VPOPCNTDQVL-LABEL: ugt_44_v4i64:
16646 ; AVX512VPOPCNTDQVL: # %bb.0:
16647 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16648 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [44,44,44,44]
16649 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16650 ; AVX512VPOPCNTDQVL-NEXT: retq
16652 ; BITALG_NOVLX-LABEL: ugt_44_v4i64:
16653 ; BITALG_NOVLX: # %bb.0:
16654 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16655 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16656 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16657 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16658 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [44,44,44,44]
16659 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16660 ; BITALG_NOVLX-NEXT: retq
16662 ; BITALG-LABEL: ugt_44_v4i64:
16664 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16665 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16666 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16667 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [44,44,44,44]
16668 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16669 ; BITALG-NEXT: retq
16670 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16671 %3 = icmp ugt <4 x i64> %2, <i64 44, i64 44, i64 44, i64 44>
16672 %4 = sext <4 x i1> %3 to <4 x i64>
16676 define <4 x i64> @ult_45_v4i64(<4 x i64> %0) {
16677 ; AVX1-LABEL: ult_45_v4i64:
16679 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16680 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16681 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16682 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16683 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16684 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16685 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16686 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16687 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16688 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16689 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16690 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16691 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16692 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16693 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16694 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16695 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16696 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16697 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [45,45]
16698 ; AVX1-NEXT: # xmm1 = mem[0,0]
16699 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
16700 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
16701 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16704 ; AVX2-LABEL: ult_45_v4i64:
16706 ; AVX2-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]
16707 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16708 ; AVX2-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]
16709 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16710 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16711 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16712 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16713 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16714 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16715 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16716 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16717 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [45,45,45,45]
16718 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16721 ; AVX512VPOPCNTDQ-LABEL: ult_45_v4i64:
16722 ; AVX512VPOPCNTDQ: # %bb.0:
16723 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16724 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16725 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [45,45,45,45]
16726 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16727 ; AVX512VPOPCNTDQ-NEXT: retq
16729 ; AVX512VPOPCNTDQVL-LABEL: ult_45_v4i64:
16730 ; AVX512VPOPCNTDQVL: # %bb.0:
16731 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16732 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [45,45,45,45]
16733 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16734 ; AVX512VPOPCNTDQVL-NEXT: retq
16736 ; BITALG_NOVLX-LABEL: ult_45_v4i64:
16737 ; BITALG_NOVLX: # %bb.0:
16738 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16739 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16740 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16741 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16742 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [45,45,45,45]
16743 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16744 ; BITALG_NOVLX-NEXT: retq
16746 ; BITALG-LABEL: ult_45_v4i64:
16748 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16749 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16750 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16751 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [45,45,45,45]
16752 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16753 ; BITALG-NEXT: retq
16754 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16755 %3 = icmp ult <4 x i64> %2, <i64 45, i64 45, i64 45, i64 45>
16756 %4 = sext <4 x i1> %3 to <4 x i64>
16760 define <4 x i64> @ugt_45_v4i64(<4 x i64> %0) {
16761 ; AVX1-LABEL: ugt_45_v4i64:
16763 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16764 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16765 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16766 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16767 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16768 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16769 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16770 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16771 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16772 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16773 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16774 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16775 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16776 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16777 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16778 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16779 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16780 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16781 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [45,45]
16782 ; AVX1-NEXT: # xmm1 = mem[0,0]
16783 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
16784 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
16785 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16788 ; AVX2-LABEL: ugt_45_v4i64:
16790 ; AVX2-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]
16791 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16792 ; AVX2-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]
16793 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16794 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16795 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16796 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16797 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16798 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16799 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16800 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16801 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [45,45,45,45]
16802 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16805 ; AVX512VPOPCNTDQ-LABEL: ugt_45_v4i64:
16806 ; AVX512VPOPCNTDQ: # %bb.0:
16807 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16808 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16809 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [45,45,45,45]
16810 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16811 ; AVX512VPOPCNTDQ-NEXT: retq
16813 ; AVX512VPOPCNTDQVL-LABEL: ugt_45_v4i64:
16814 ; AVX512VPOPCNTDQVL: # %bb.0:
16815 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16816 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [45,45,45,45]
16817 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16818 ; AVX512VPOPCNTDQVL-NEXT: retq
16820 ; BITALG_NOVLX-LABEL: ugt_45_v4i64:
16821 ; BITALG_NOVLX: # %bb.0:
16822 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16823 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16824 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16825 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16826 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [45,45,45,45]
16827 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16828 ; BITALG_NOVLX-NEXT: retq
16830 ; BITALG-LABEL: ugt_45_v4i64:
16832 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16833 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16834 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16835 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [45,45,45,45]
16836 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16837 ; BITALG-NEXT: retq
16838 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16839 %3 = icmp ugt <4 x i64> %2, <i64 45, i64 45, i64 45, i64 45>
16840 %4 = sext <4 x i1> %3 to <4 x i64>
16844 define <4 x i64> @ult_46_v4i64(<4 x i64> %0) {
16845 ; AVX1-LABEL: ult_46_v4i64:
16847 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16848 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16849 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16850 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16851 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16852 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16853 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16854 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16855 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16856 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16857 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16858 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16859 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16860 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16861 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16862 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16863 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16864 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16865 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [46,46]
16866 ; AVX1-NEXT: # xmm1 = mem[0,0]
16867 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
16868 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
16869 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16872 ; AVX2-LABEL: ult_46_v4i64:
16874 ; AVX2-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]
16875 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16876 ; AVX2-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]
16877 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16878 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16879 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16880 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16881 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16882 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16883 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16884 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16885 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [46,46,46,46]
16886 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16889 ; AVX512VPOPCNTDQ-LABEL: ult_46_v4i64:
16890 ; AVX512VPOPCNTDQ: # %bb.0:
16891 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16892 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16893 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [46,46,46,46]
16894 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16895 ; AVX512VPOPCNTDQ-NEXT: retq
16897 ; AVX512VPOPCNTDQVL-LABEL: ult_46_v4i64:
16898 ; AVX512VPOPCNTDQVL: # %bb.0:
16899 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16900 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [46,46,46,46]
16901 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16902 ; AVX512VPOPCNTDQVL-NEXT: retq
16904 ; BITALG_NOVLX-LABEL: ult_46_v4i64:
16905 ; BITALG_NOVLX: # %bb.0:
16906 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16907 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16908 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16909 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16910 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [46,46,46,46]
16911 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16912 ; BITALG_NOVLX-NEXT: retq
16914 ; BITALG-LABEL: ult_46_v4i64:
16916 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
16917 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
16918 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16919 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [46,46,46,46]
16920 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
16921 ; BITALG-NEXT: retq
16922 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
16923 %3 = icmp ult <4 x i64> %2, <i64 46, i64 46, i64 46, i64 46>
16924 %4 = sext <4 x i1> %3 to <4 x i64>
16928 define <4 x i64> @ugt_46_v4i64(<4 x i64> %0) {
16929 ; AVX1-LABEL: ugt_46_v4i64:
16931 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
16932 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
16933 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
16934 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
16935 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
16936 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
16937 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
16938 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
16939 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
16940 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
16941 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
16942 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
16943 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
16944 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
16945 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
16946 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
16947 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
16948 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
16949 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [46,46]
16950 ; AVX1-NEXT: # xmm1 = mem[0,0]
16951 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
16952 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
16953 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
16956 ; AVX2-LABEL: ugt_46_v4i64:
16958 ; AVX2-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]
16959 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
16960 ; AVX2-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]
16961 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
16962 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
16963 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
16964 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
16965 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
16966 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
16967 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
16968 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16969 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [46,46,46,46]
16970 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16973 ; AVX512VPOPCNTDQ-LABEL: ugt_46_v4i64:
16974 ; AVX512VPOPCNTDQ: # %bb.0:
16975 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16976 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
16977 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [46,46,46,46]
16978 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16979 ; AVX512VPOPCNTDQ-NEXT: retq
16981 ; AVX512VPOPCNTDQVL-LABEL: ugt_46_v4i64:
16982 ; AVX512VPOPCNTDQVL: # %bb.0:
16983 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
16984 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [46,46,46,46]
16985 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16986 ; AVX512VPOPCNTDQVL-NEXT: retq
16988 ; BITALG_NOVLX-LABEL: ugt_46_v4i64:
16989 ; BITALG_NOVLX: # %bb.0:
16990 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
16991 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
16992 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
16993 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
16994 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [46,46,46,46]
16995 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
16996 ; BITALG_NOVLX-NEXT: retq
16998 ; BITALG-LABEL: ugt_46_v4i64:
17000 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17001 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17002 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17003 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [46,46,46,46]
17004 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17005 ; BITALG-NEXT: retq
17006 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17007 %3 = icmp ugt <4 x i64> %2, <i64 46, i64 46, i64 46, i64 46>
17008 %4 = sext <4 x i1> %3 to <4 x i64>
17012 define <4 x i64> @ult_47_v4i64(<4 x i64> %0) {
17013 ; AVX1-LABEL: ult_47_v4i64:
17015 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17016 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17017 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17018 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17019 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17020 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17021 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17022 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17023 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17024 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17025 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17026 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17027 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17028 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17029 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17030 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17031 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17032 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17033 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [47,47]
17034 ; AVX1-NEXT: # xmm1 = mem[0,0]
17035 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
17036 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
17037 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17040 ; AVX2-LABEL: ult_47_v4i64:
17042 ; AVX2-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]
17043 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17044 ; AVX2-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]
17045 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17046 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17047 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17048 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17049 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17050 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17051 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17052 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17053 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [47,47,47,47]
17054 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17057 ; AVX512VPOPCNTDQ-LABEL: ult_47_v4i64:
17058 ; AVX512VPOPCNTDQ: # %bb.0:
17059 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17060 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17061 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [47,47,47,47]
17062 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17063 ; AVX512VPOPCNTDQ-NEXT: retq
17065 ; AVX512VPOPCNTDQVL-LABEL: ult_47_v4i64:
17066 ; AVX512VPOPCNTDQVL: # %bb.0:
17067 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17068 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [47,47,47,47]
17069 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17070 ; AVX512VPOPCNTDQVL-NEXT: retq
17072 ; BITALG_NOVLX-LABEL: ult_47_v4i64:
17073 ; BITALG_NOVLX: # %bb.0:
17074 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17075 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17076 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17077 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17078 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [47,47,47,47]
17079 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17080 ; BITALG_NOVLX-NEXT: retq
17082 ; BITALG-LABEL: ult_47_v4i64:
17084 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17085 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17086 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17087 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [47,47,47,47]
17088 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17089 ; BITALG-NEXT: retq
17090 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17091 %3 = icmp ult <4 x i64> %2, <i64 47, i64 47, i64 47, i64 47>
17092 %4 = sext <4 x i1> %3 to <4 x i64>
17096 define <4 x i64> @ugt_47_v4i64(<4 x i64> %0) {
17097 ; AVX1-LABEL: ugt_47_v4i64:
17099 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17100 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17101 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17102 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17103 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17104 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17105 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17106 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17107 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17108 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17109 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17110 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17111 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17112 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17113 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17114 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17115 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17116 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17117 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [47,47]
17118 ; AVX1-NEXT: # xmm1 = mem[0,0]
17119 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
17120 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
17121 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17124 ; AVX2-LABEL: ugt_47_v4i64:
17126 ; AVX2-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]
17127 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17128 ; AVX2-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]
17129 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17130 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17131 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17132 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17133 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17134 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17135 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17136 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17137 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [47,47,47,47]
17138 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17141 ; AVX512VPOPCNTDQ-LABEL: ugt_47_v4i64:
17142 ; AVX512VPOPCNTDQ: # %bb.0:
17143 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17144 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17145 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [47,47,47,47]
17146 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17147 ; AVX512VPOPCNTDQ-NEXT: retq
17149 ; AVX512VPOPCNTDQVL-LABEL: ugt_47_v4i64:
17150 ; AVX512VPOPCNTDQVL: # %bb.0:
17151 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17152 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [47,47,47,47]
17153 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17154 ; AVX512VPOPCNTDQVL-NEXT: retq
17156 ; BITALG_NOVLX-LABEL: ugt_47_v4i64:
17157 ; BITALG_NOVLX: # %bb.0:
17158 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17159 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17160 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17161 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17162 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [47,47,47,47]
17163 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17164 ; BITALG_NOVLX-NEXT: retq
17166 ; BITALG-LABEL: ugt_47_v4i64:
17168 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17169 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17170 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17171 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [47,47,47,47]
17172 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17173 ; BITALG-NEXT: retq
17174 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17175 %3 = icmp ugt <4 x i64> %2, <i64 47, i64 47, i64 47, i64 47>
17176 %4 = sext <4 x i1> %3 to <4 x i64>
17180 define <4 x i64> @ult_48_v4i64(<4 x i64> %0) {
17181 ; AVX1-LABEL: ult_48_v4i64:
17183 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17184 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17185 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17186 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17187 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17188 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17189 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17190 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17191 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17192 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17193 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17194 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17195 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17196 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17197 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17198 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17199 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17200 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17201 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [48,48]
17202 ; AVX1-NEXT: # xmm1 = mem[0,0]
17203 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
17204 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
17205 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17208 ; AVX2-LABEL: ult_48_v4i64:
17210 ; AVX2-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]
17211 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17212 ; AVX2-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]
17213 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17214 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17215 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17216 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17217 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17218 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17219 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17220 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17221 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [48,48,48,48]
17222 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17225 ; AVX512VPOPCNTDQ-LABEL: ult_48_v4i64:
17226 ; AVX512VPOPCNTDQ: # %bb.0:
17227 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17228 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17229 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [48,48,48,48]
17230 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17231 ; AVX512VPOPCNTDQ-NEXT: retq
17233 ; AVX512VPOPCNTDQVL-LABEL: ult_48_v4i64:
17234 ; AVX512VPOPCNTDQVL: # %bb.0:
17235 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17236 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [48,48,48,48]
17237 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17238 ; AVX512VPOPCNTDQVL-NEXT: retq
17240 ; BITALG_NOVLX-LABEL: ult_48_v4i64:
17241 ; BITALG_NOVLX: # %bb.0:
17242 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17243 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17244 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17245 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17246 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [48,48,48,48]
17247 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17248 ; BITALG_NOVLX-NEXT: retq
17250 ; BITALG-LABEL: ult_48_v4i64:
17252 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17253 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17254 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17255 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [48,48,48,48]
17256 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17257 ; BITALG-NEXT: retq
17258 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17259 %3 = icmp ult <4 x i64> %2, <i64 48, i64 48, i64 48, i64 48>
17260 %4 = sext <4 x i1> %3 to <4 x i64>
17264 define <4 x i64> @ugt_48_v4i64(<4 x i64> %0) {
17265 ; AVX1-LABEL: ugt_48_v4i64:
17267 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17268 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17269 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17270 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17271 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17272 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17273 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17274 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17275 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17276 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17277 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17278 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17279 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17280 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17281 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17282 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17283 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17284 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17285 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [48,48]
17286 ; AVX1-NEXT: # xmm1 = mem[0,0]
17287 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
17288 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
17289 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17292 ; AVX2-LABEL: ugt_48_v4i64:
17294 ; AVX2-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]
17295 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17296 ; AVX2-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]
17297 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17298 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17299 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17300 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17301 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17302 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17303 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17304 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17305 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [48,48,48,48]
17306 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17309 ; AVX512VPOPCNTDQ-LABEL: ugt_48_v4i64:
17310 ; AVX512VPOPCNTDQ: # %bb.0:
17311 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17312 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17313 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [48,48,48,48]
17314 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17315 ; AVX512VPOPCNTDQ-NEXT: retq
17317 ; AVX512VPOPCNTDQVL-LABEL: ugt_48_v4i64:
17318 ; AVX512VPOPCNTDQVL: # %bb.0:
17319 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17320 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [48,48,48,48]
17321 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17322 ; AVX512VPOPCNTDQVL-NEXT: retq
17324 ; BITALG_NOVLX-LABEL: ugt_48_v4i64:
17325 ; BITALG_NOVLX: # %bb.0:
17326 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17327 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17328 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17329 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17330 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [48,48,48,48]
17331 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17332 ; BITALG_NOVLX-NEXT: retq
17334 ; BITALG-LABEL: ugt_48_v4i64:
17336 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17337 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17338 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17339 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [48,48,48,48]
17340 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17341 ; BITALG-NEXT: retq
17342 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17343 %3 = icmp ugt <4 x i64> %2, <i64 48, i64 48, i64 48, i64 48>
17344 %4 = sext <4 x i1> %3 to <4 x i64>
17348 define <4 x i64> @ult_49_v4i64(<4 x i64> %0) {
17349 ; AVX1-LABEL: ult_49_v4i64:
17351 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17352 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17353 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17354 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17355 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17356 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17357 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17358 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17359 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17360 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17361 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17362 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17363 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17364 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17365 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17366 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17367 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17368 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17369 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [49,49]
17370 ; AVX1-NEXT: # xmm1 = mem[0,0]
17371 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
17372 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
17373 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17376 ; AVX2-LABEL: ult_49_v4i64:
17378 ; AVX2-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]
17379 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17380 ; AVX2-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]
17381 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17382 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17383 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17384 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17385 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17386 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17387 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17388 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17389 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [49,49,49,49]
17390 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17393 ; AVX512VPOPCNTDQ-LABEL: ult_49_v4i64:
17394 ; AVX512VPOPCNTDQ: # %bb.0:
17395 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17396 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17397 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [49,49,49,49]
17398 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17399 ; AVX512VPOPCNTDQ-NEXT: retq
17401 ; AVX512VPOPCNTDQVL-LABEL: ult_49_v4i64:
17402 ; AVX512VPOPCNTDQVL: # %bb.0:
17403 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17404 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [49,49,49,49]
17405 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17406 ; AVX512VPOPCNTDQVL-NEXT: retq
17408 ; BITALG_NOVLX-LABEL: ult_49_v4i64:
17409 ; BITALG_NOVLX: # %bb.0:
17410 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17411 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17412 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17413 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17414 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [49,49,49,49]
17415 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17416 ; BITALG_NOVLX-NEXT: retq
17418 ; BITALG-LABEL: ult_49_v4i64:
17420 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17421 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17422 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17423 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [49,49,49,49]
17424 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17425 ; BITALG-NEXT: retq
17426 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17427 %3 = icmp ult <4 x i64> %2, <i64 49, i64 49, i64 49, i64 49>
17428 %4 = sext <4 x i1> %3 to <4 x i64>
17432 define <4 x i64> @ugt_49_v4i64(<4 x i64> %0) {
17433 ; AVX1-LABEL: ugt_49_v4i64:
17435 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17436 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17437 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17438 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17439 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17440 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17441 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17442 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17443 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17444 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17445 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17446 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17447 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17448 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17449 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17450 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17451 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17452 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17453 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [49,49]
17454 ; AVX1-NEXT: # xmm1 = mem[0,0]
17455 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
17456 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
17457 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17460 ; AVX2-LABEL: ugt_49_v4i64:
17462 ; AVX2-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]
17463 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17464 ; AVX2-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]
17465 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17466 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17467 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17468 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17469 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17470 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17471 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17472 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17473 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [49,49,49,49]
17474 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17477 ; AVX512VPOPCNTDQ-LABEL: ugt_49_v4i64:
17478 ; AVX512VPOPCNTDQ: # %bb.0:
17479 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17480 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17481 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [49,49,49,49]
17482 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17483 ; AVX512VPOPCNTDQ-NEXT: retq
17485 ; AVX512VPOPCNTDQVL-LABEL: ugt_49_v4i64:
17486 ; AVX512VPOPCNTDQVL: # %bb.0:
17487 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17488 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [49,49,49,49]
17489 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17490 ; AVX512VPOPCNTDQVL-NEXT: retq
17492 ; BITALG_NOVLX-LABEL: ugt_49_v4i64:
17493 ; BITALG_NOVLX: # %bb.0:
17494 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17495 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17496 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17497 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17498 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [49,49,49,49]
17499 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17500 ; BITALG_NOVLX-NEXT: retq
17502 ; BITALG-LABEL: ugt_49_v4i64:
17504 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17505 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17506 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17507 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [49,49,49,49]
17508 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17509 ; BITALG-NEXT: retq
17510 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17511 %3 = icmp ugt <4 x i64> %2, <i64 49, i64 49, i64 49, i64 49>
17512 %4 = sext <4 x i1> %3 to <4 x i64>
17516 define <4 x i64> @ult_50_v4i64(<4 x i64> %0) {
17517 ; AVX1-LABEL: ult_50_v4i64:
17519 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17520 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17521 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17522 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17523 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17524 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17525 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17526 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17527 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17528 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17529 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17530 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17531 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17532 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17533 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17534 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17535 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17536 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17537 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [50,50]
17538 ; AVX1-NEXT: # xmm1 = mem[0,0]
17539 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
17540 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
17541 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17544 ; AVX2-LABEL: ult_50_v4i64:
17546 ; AVX2-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]
17547 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17548 ; AVX2-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]
17549 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17550 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17551 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17552 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17553 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17554 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17555 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17556 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17557 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [50,50,50,50]
17558 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17561 ; AVX512VPOPCNTDQ-LABEL: ult_50_v4i64:
17562 ; AVX512VPOPCNTDQ: # %bb.0:
17563 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17564 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17565 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [50,50,50,50]
17566 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17567 ; AVX512VPOPCNTDQ-NEXT: retq
17569 ; AVX512VPOPCNTDQVL-LABEL: ult_50_v4i64:
17570 ; AVX512VPOPCNTDQVL: # %bb.0:
17571 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17572 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [50,50,50,50]
17573 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17574 ; AVX512VPOPCNTDQVL-NEXT: retq
17576 ; BITALG_NOVLX-LABEL: ult_50_v4i64:
17577 ; BITALG_NOVLX: # %bb.0:
17578 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17579 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17580 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17581 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17582 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [50,50,50,50]
17583 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17584 ; BITALG_NOVLX-NEXT: retq
17586 ; BITALG-LABEL: ult_50_v4i64:
17588 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17589 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17590 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17591 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [50,50,50,50]
17592 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17593 ; BITALG-NEXT: retq
17594 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17595 %3 = icmp ult <4 x i64> %2, <i64 50, i64 50, i64 50, i64 50>
17596 %4 = sext <4 x i1> %3 to <4 x i64>
17600 define <4 x i64> @ugt_50_v4i64(<4 x i64> %0) {
17601 ; AVX1-LABEL: ugt_50_v4i64:
17603 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17604 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17605 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17606 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17607 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17608 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17609 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17610 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17611 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17612 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17613 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17614 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17615 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17616 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17617 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17618 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17619 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17620 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17621 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [50,50]
17622 ; AVX1-NEXT: # xmm1 = mem[0,0]
17623 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
17624 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
17625 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17628 ; AVX2-LABEL: ugt_50_v4i64:
17630 ; AVX2-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]
17631 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17632 ; AVX2-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]
17633 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17634 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17635 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17636 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17637 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17638 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17639 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17640 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17641 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [50,50,50,50]
17642 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17645 ; AVX512VPOPCNTDQ-LABEL: ugt_50_v4i64:
17646 ; AVX512VPOPCNTDQ: # %bb.0:
17647 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17648 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17649 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [50,50,50,50]
17650 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17651 ; AVX512VPOPCNTDQ-NEXT: retq
17653 ; AVX512VPOPCNTDQVL-LABEL: ugt_50_v4i64:
17654 ; AVX512VPOPCNTDQVL: # %bb.0:
17655 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17656 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [50,50,50,50]
17657 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17658 ; AVX512VPOPCNTDQVL-NEXT: retq
17660 ; BITALG_NOVLX-LABEL: ugt_50_v4i64:
17661 ; BITALG_NOVLX: # %bb.0:
17662 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17663 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17664 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17665 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17666 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [50,50,50,50]
17667 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17668 ; BITALG_NOVLX-NEXT: retq
17670 ; BITALG-LABEL: ugt_50_v4i64:
17672 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17673 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17674 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17675 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [50,50,50,50]
17676 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17677 ; BITALG-NEXT: retq
17678 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17679 %3 = icmp ugt <4 x i64> %2, <i64 50, i64 50, i64 50, i64 50>
17680 %4 = sext <4 x i1> %3 to <4 x i64>
17684 define <4 x i64> @ult_51_v4i64(<4 x i64> %0) {
17685 ; AVX1-LABEL: ult_51_v4i64:
17687 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17688 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17689 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17690 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17691 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17692 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17693 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17694 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17695 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17696 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17697 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17698 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17699 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17700 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17701 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17702 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17703 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17704 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17705 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [51,51]
17706 ; AVX1-NEXT: # xmm1 = mem[0,0]
17707 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
17708 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
17709 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17712 ; AVX2-LABEL: ult_51_v4i64:
17714 ; AVX2-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]
17715 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17716 ; AVX2-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]
17717 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17718 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17719 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17720 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17721 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17722 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17723 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17724 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17725 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [51,51,51,51]
17726 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17729 ; AVX512VPOPCNTDQ-LABEL: ult_51_v4i64:
17730 ; AVX512VPOPCNTDQ: # %bb.0:
17731 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17732 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17733 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [51,51,51,51]
17734 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17735 ; AVX512VPOPCNTDQ-NEXT: retq
17737 ; AVX512VPOPCNTDQVL-LABEL: ult_51_v4i64:
17738 ; AVX512VPOPCNTDQVL: # %bb.0:
17739 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17740 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [51,51,51,51]
17741 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17742 ; AVX512VPOPCNTDQVL-NEXT: retq
17744 ; BITALG_NOVLX-LABEL: ult_51_v4i64:
17745 ; BITALG_NOVLX: # %bb.0:
17746 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17747 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17748 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17749 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17750 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [51,51,51,51]
17751 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17752 ; BITALG_NOVLX-NEXT: retq
17754 ; BITALG-LABEL: ult_51_v4i64:
17756 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17757 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17758 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17759 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [51,51,51,51]
17760 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17761 ; BITALG-NEXT: retq
17762 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17763 %3 = icmp ult <4 x i64> %2, <i64 51, i64 51, i64 51, i64 51>
17764 %4 = sext <4 x i1> %3 to <4 x i64>
17768 define <4 x i64> @ugt_51_v4i64(<4 x i64> %0) {
17769 ; AVX1-LABEL: ugt_51_v4i64:
17771 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17772 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17773 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17774 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17775 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17776 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17777 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17778 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17779 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17780 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17781 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17782 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17783 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17784 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17785 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17786 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17787 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17788 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17789 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [51,51]
17790 ; AVX1-NEXT: # xmm1 = mem[0,0]
17791 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
17792 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
17793 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17796 ; AVX2-LABEL: ugt_51_v4i64:
17798 ; AVX2-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]
17799 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17800 ; AVX2-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]
17801 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17802 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17803 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17804 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17805 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17806 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17807 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17808 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17809 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [51,51,51,51]
17810 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17813 ; AVX512VPOPCNTDQ-LABEL: ugt_51_v4i64:
17814 ; AVX512VPOPCNTDQ: # %bb.0:
17815 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17816 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17817 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [51,51,51,51]
17818 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17819 ; AVX512VPOPCNTDQ-NEXT: retq
17821 ; AVX512VPOPCNTDQVL-LABEL: ugt_51_v4i64:
17822 ; AVX512VPOPCNTDQVL: # %bb.0:
17823 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17824 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [51,51,51,51]
17825 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17826 ; AVX512VPOPCNTDQVL-NEXT: retq
17828 ; BITALG_NOVLX-LABEL: ugt_51_v4i64:
17829 ; BITALG_NOVLX: # %bb.0:
17830 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17831 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17832 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17833 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17834 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [51,51,51,51]
17835 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17836 ; BITALG_NOVLX-NEXT: retq
17838 ; BITALG-LABEL: ugt_51_v4i64:
17840 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17841 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17842 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17843 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [51,51,51,51]
17844 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17845 ; BITALG-NEXT: retq
17846 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17847 %3 = icmp ugt <4 x i64> %2, <i64 51, i64 51, i64 51, i64 51>
17848 %4 = sext <4 x i1> %3 to <4 x i64>
17852 define <4 x i64> @ult_52_v4i64(<4 x i64> %0) {
17853 ; AVX1-LABEL: ult_52_v4i64:
17855 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17856 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17857 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17858 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17859 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17860 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17861 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17862 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17863 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17864 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17865 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17866 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17867 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17868 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17869 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17870 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17871 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17872 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17873 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [52,52]
17874 ; AVX1-NEXT: # xmm1 = mem[0,0]
17875 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
17876 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
17877 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17880 ; AVX2-LABEL: ult_52_v4i64:
17882 ; AVX2-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]
17883 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17884 ; AVX2-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]
17885 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17886 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17887 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17888 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17889 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17890 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17891 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17892 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17893 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [52,52,52,52]
17894 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17897 ; AVX512VPOPCNTDQ-LABEL: ult_52_v4i64:
17898 ; AVX512VPOPCNTDQ: # %bb.0:
17899 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17900 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17901 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [52,52,52,52]
17902 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17903 ; AVX512VPOPCNTDQ-NEXT: retq
17905 ; AVX512VPOPCNTDQVL-LABEL: ult_52_v4i64:
17906 ; AVX512VPOPCNTDQVL: # %bb.0:
17907 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17908 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [52,52,52,52]
17909 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17910 ; AVX512VPOPCNTDQVL-NEXT: retq
17912 ; BITALG_NOVLX-LABEL: ult_52_v4i64:
17913 ; BITALG_NOVLX: # %bb.0:
17914 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17915 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
17916 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
17917 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17918 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [52,52,52,52]
17919 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17920 ; BITALG_NOVLX-NEXT: retq
17922 ; BITALG-LABEL: ult_52_v4i64:
17924 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
17925 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
17926 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17927 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [52,52,52,52]
17928 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
17929 ; BITALG-NEXT: retq
17930 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
17931 %3 = icmp ult <4 x i64> %2, <i64 52, i64 52, i64 52, i64 52>
17932 %4 = sext <4 x i1> %3 to <4 x i64>
17936 define <4 x i64> @ugt_52_v4i64(<4 x i64> %0) {
17937 ; AVX1-LABEL: ugt_52_v4i64:
17939 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
17940 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
17941 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
17942 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
17943 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
17944 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
17945 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
17946 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
17947 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
17948 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
17949 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
17950 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
17951 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
17952 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
17953 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
17954 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
17955 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
17956 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
17957 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [52,52]
17958 ; AVX1-NEXT: # xmm1 = mem[0,0]
17959 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
17960 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
17961 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
17964 ; AVX2-LABEL: ugt_52_v4i64:
17966 ; AVX2-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]
17967 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
17968 ; AVX2-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]
17969 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
17970 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
17971 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
17972 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
17973 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
17974 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
17975 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
17976 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
17977 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [52,52,52,52]
17978 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17981 ; AVX512VPOPCNTDQ-LABEL: ugt_52_v4i64:
17982 ; AVX512VPOPCNTDQ: # %bb.0:
17983 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17984 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
17985 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [52,52,52,52]
17986 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17987 ; AVX512VPOPCNTDQ-NEXT: retq
17989 ; AVX512VPOPCNTDQVL-LABEL: ugt_52_v4i64:
17990 ; AVX512VPOPCNTDQVL: # %bb.0:
17991 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
17992 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [52,52,52,52]
17993 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
17994 ; AVX512VPOPCNTDQVL-NEXT: retq
17996 ; BITALG_NOVLX-LABEL: ugt_52_v4i64:
17997 ; BITALG_NOVLX: # %bb.0:
17998 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
17999 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18000 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18001 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18002 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [52,52,52,52]
18003 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18004 ; BITALG_NOVLX-NEXT: retq
18006 ; BITALG-LABEL: ugt_52_v4i64:
18008 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18009 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18010 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18011 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [52,52,52,52]
18012 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18013 ; BITALG-NEXT: retq
18014 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18015 %3 = icmp ugt <4 x i64> %2, <i64 52, i64 52, i64 52, i64 52>
18016 %4 = sext <4 x i1> %3 to <4 x i64>
18020 define <4 x i64> @ult_53_v4i64(<4 x i64> %0) {
18021 ; AVX1-LABEL: ult_53_v4i64:
18023 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18024 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18025 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18026 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18027 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18028 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18029 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18030 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18031 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18032 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18033 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18034 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18035 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18036 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18037 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18038 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18039 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18040 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18041 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [53,53]
18042 ; AVX1-NEXT: # xmm1 = mem[0,0]
18043 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
18044 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
18045 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18048 ; AVX2-LABEL: ult_53_v4i64:
18050 ; AVX2-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]
18051 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18052 ; AVX2-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]
18053 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18054 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18055 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18056 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18057 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18058 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18059 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18060 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18061 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [53,53,53,53]
18062 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18065 ; AVX512VPOPCNTDQ-LABEL: ult_53_v4i64:
18066 ; AVX512VPOPCNTDQ: # %bb.0:
18067 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18068 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18069 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [53,53,53,53]
18070 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18071 ; AVX512VPOPCNTDQ-NEXT: retq
18073 ; AVX512VPOPCNTDQVL-LABEL: ult_53_v4i64:
18074 ; AVX512VPOPCNTDQVL: # %bb.0:
18075 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18076 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [53,53,53,53]
18077 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18078 ; AVX512VPOPCNTDQVL-NEXT: retq
18080 ; BITALG_NOVLX-LABEL: ult_53_v4i64:
18081 ; BITALG_NOVLX: # %bb.0:
18082 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18083 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18084 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18085 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18086 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [53,53,53,53]
18087 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18088 ; BITALG_NOVLX-NEXT: retq
18090 ; BITALG-LABEL: ult_53_v4i64:
18092 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18093 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18094 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18095 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [53,53,53,53]
18096 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18097 ; BITALG-NEXT: retq
18098 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18099 %3 = icmp ult <4 x i64> %2, <i64 53, i64 53, i64 53, i64 53>
18100 %4 = sext <4 x i1> %3 to <4 x i64>
18104 define <4 x i64> @ugt_53_v4i64(<4 x i64> %0) {
18105 ; AVX1-LABEL: ugt_53_v4i64:
18107 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18108 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18109 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18110 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18111 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18112 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18113 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18114 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18115 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18116 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18117 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18118 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18119 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18120 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18121 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18122 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18123 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18124 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18125 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [53,53]
18126 ; AVX1-NEXT: # xmm1 = mem[0,0]
18127 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
18128 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
18129 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18132 ; AVX2-LABEL: ugt_53_v4i64:
18134 ; AVX2-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]
18135 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18136 ; AVX2-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]
18137 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18138 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18139 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18140 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18141 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18142 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18143 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18144 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18145 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [53,53,53,53]
18146 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18149 ; AVX512VPOPCNTDQ-LABEL: ugt_53_v4i64:
18150 ; AVX512VPOPCNTDQ: # %bb.0:
18151 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18152 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18153 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [53,53,53,53]
18154 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18155 ; AVX512VPOPCNTDQ-NEXT: retq
18157 ; AVX512VPOPCNTDQVL-LABEL: ugt_53_v4i64:
18158 ; AVX512VPOPCNTDQVL: # %bb.0:
18159 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18160 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [53,53,53,53]
18161 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18162 ; AVX512VPOPCNTDQVL-NEXT: retq
18164 ; BITALG_NOVLX-LABEL: ugt_53_v4i64:
18165 ; BITALG_NOVLX: # %bb.0:
18166 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18167 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18168 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18169 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18170 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [53,53,53,53]
18171 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18172 ; BITALG_NOVLX-NEXT: retq
18174 ; BITALG-LABEL: ugt_53_v4i64:
18176 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18177 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18178 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18179 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [53,53,53,53]
18180 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18181 ; BITALG-NEXT: retq
18182 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18183 %3 = icmp ugt <4 x i64> %2, <i64 53, i64 53, i64 53, i64 53>
18184 %4 = sext <4 x i1> %3 to <4 x i64>
18188 define <4 x i64> @ult_54_v4i64(<4 x i64> %0) {
18189 ; AVX1-LABEL: ult_54_v4i64:
18191 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18192 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18193 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18194 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18195 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18196 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18197 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18198 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18199 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18200 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18201 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18202 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18203 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18204 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18205 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18206 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18207 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18208 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18209 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [54,54]
18210 ; AVX1-NEXT: # xmm1 = mem[0,0]
18211 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
18212 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
18213 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18216 ; AVX2-LABEL: ult_54_v4i64:
18218 ; AVX2-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]
18219 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18220 ; AVX2-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]
18221 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18222 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18223 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18224 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18225 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18226 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18227 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18228 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18229 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [54,54,54,54]
18230 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18233 ; AVX512VPOPCNTDQ-LABEL: ult_54_v4i64:
18234 ; AVX512VPOPCNTDQ: # %bb.0:
18235 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18236 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18237 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [54,54,54,54]
18238 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18239 ; AVX512VPOPCNTDQ-NEXT: retq
18241 ; AVX512VPOPCNTDQVL-LABEL: ult_54_v4i64:
18242 ; AVX512VPOPCNTDQVL: # %bb.0:
18243 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18244 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [54,54,54,54]
18245 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18246 ; AVX512VPOPCNTDQVL-NEXT: retq
18248 ; BITALG_NOVLX-LABEL: ult_54_v4i64:
18249 ; BITALG_NOVLX: # %bb.0:
18250 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18251 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18252 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18253 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18254 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [54,54,54,54]
18255 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18256 ; BITALG_NOVLX-NEXT: retq
18258 ; BITALG-LABEL: ult_54_v4i64:
18260 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18261 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18262 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18263 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [54,54,54,54]
18264 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18265 ; BITALG-NEXT: retq
18266 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18267 %3 = icmp ult <4 x i64> %2, <i64 54, i64 54, i64 54, i64 54>
18268 %4 = sext <4 x i1> %3 to <4 x i64>
18272 define <4 x i64> @ugt_54_v4i64(<4 x i64> %0) {
18273 ; AVX1-LABEL: ugt_54_v4i64:
18275 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18276 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18277 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18278 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18279 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18280 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18281 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18282 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18283 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18284 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18285 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18286 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18287 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18288 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18289 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18290 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18291 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18292 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18293 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [54,54]
18294 ; AVX1-NEXT: # xmm1 = mem[0,0]
18295 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
18296 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
18297 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18300 ; AVX2-LABEL: ugt_54_v4i64:
18302 ; AVX2-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]
18303 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18304 ; AVX2-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]
18305 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18306 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18307 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18308 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18309 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18310 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18311 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18312 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18313 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [54,54,54,54]
18314 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18317 ; AVX512VPOPCNTDQ-LABEL: ugt_54_v4i64:
18318 ; AVX512VPOPCNTDQ: # %bb.0:
18319 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18320 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18321 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [54,54,54,54]
18322 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18323 ; AVX512VPOPCNTDQ-NEXT: retq
18325 ; AVX512VPOPCNTDQVL-LABEL: ugt_54_v4i64:
18326 ; AVX512VPOPCNTDQVL: # %bb.0:
18327 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18328 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [54,54,54,54]
18329 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18330 ; AVX512VPOPCNTDQVL-NEXT: retq
18332 ; BITALG_NOVLX-LABEL: ugt_54_v4i64:
18333 ; BITALG_NOVLX: # %bb.0:
18334 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18335 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18336 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18337 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18338 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [54,54,54,54]
18339 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18340 ; BITALG_NOVLX-NEXT: retq
18342 ; BITALG-LABEL: ugt_54_v4i64:
18344 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18345 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18346 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18347 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [54,54,54,54]
18348 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18349 ; BITALG-NEXT: retq
18350 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18351 %3 = icmp ugt <4 x i64> %2, <i64 54, i64 54, i64 54, i64 54>
18352 %4 = sext <4 x i1> %3 to <4 x i64>
18356 define <4 x i64> @ult_55_v4i64(<4 x i64> %0) {
18357 ; AVX1-LABEL: ult_55_v4i64:
18359 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18360 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18361 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18362 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18363 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18364 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18365 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18366 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18367 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18368 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18369 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18370 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18371 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18372 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18373 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18374 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18375 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18376 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18377 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [55,55]
18378 ; AVX1-NEXT: # xmm1 = mem[0,0]
18379 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
18380 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
18381 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18384 ; AVX2-LABEL: ult_55_v4i64:
18386 ; AVX2-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]
18387 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18388 ; AVX2-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]
18389 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18390 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18391 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18392 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18393 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18394 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18395 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18396 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18397 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [55,55,55,55]
18398 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18401 ; AVX512VPOPCNTDQ-LABEL: ult_55_v4i64:
18402 ; AVX512VPOPCNTDQ: # %bb.0:
18403 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18404 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18405 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [55,55,55,55]
18406 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18407 ; AVX512VPOPCNTDQ-NEXT: retq
18409 ; AVX512VPOPCNTDQVL-LABEL: ult_55_v4i64:
18410 ; AVX512VPOPCNTDQVL: # %bb.0:
18411 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18412 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [55,55,55,55]
18413 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18414 ; AVX512VPOPCNTDQVL-NEXT: retq
18416 ; BITALG_NOVLX-LABEL: ult_55_v4i64:
18417 ; BITALG_NOVLX: # %bb.0:
18418 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18419 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18420 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18421 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18422 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [55,55,55,55]
18423 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18424 ; BITALG_NOVLX-NEXT: retq
18426 ; BITALG-LABEL: ult_55_v4i64:
18428 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18429 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18430 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18431 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [55,55,55,55]
18432 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18433 ; BITALG-NEXT: retq
18434 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18435 %3 = icmp ult <4 x i64> %2, <i64 55, i64 55, i64 55, i64 55>
18436 %4 = sext <4 x i1> %3 to <4 x i64>
18440 define <4 x i64> @ugt_55_v4i64(<4 x i64> %0) {
18441 ; AVX1-LABEL: ugt_55_v4i64:
18443 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18444 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18445 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18446 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18447 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18448 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18449 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18450 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18451 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18452 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18453 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18454 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18455 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18456 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18457 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18458 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18459 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18460 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18461 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [55,55]
18462 ; AVX1-NEXT: # xmm1 = mem[0,0]
18463 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
18464 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
18465 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18468 ; AVX2-LABEL: ugt_55_v4i64:
18470 ; AVX2-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]
18471 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18472 ; AVX2-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]
18473 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18474 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18475 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18476 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18477 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18478 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18479 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18480 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18481 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [55,55,55,55]
18482 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18485 ; AVX512VPOPCNTDQ-LABEL: ugt_55_v4i64:
18486 ; AVX512VPOPCNTDQ: # %bb.0:
18487 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18488 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18489 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [55,55,55,55]
18490 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18491 ; AVX512VPOPCNTDQ-NEXT: retq
18493 ; AVX512VPOPCNTDQVL-LABEL: ugt_55_v4i64:
18494 ; AVX512VPOPCNTDQVL: # %bb.0:
18495 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18496 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [55,55,55,55]
18497 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18498 ; AVX512VPOPCNTDQVL-NEXT: retq
18500 ; BITALG_NOVLX-LABEL: ugt_55_v4i64:
18501 ; BITALG_NOVLX: # %bb.0:
18502 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18503 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18504 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18505 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18506 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [55,55,55,55]
18507 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18508 ; BITALG_NOVLX-NEXT: retq
18510 ; BITALG-LABEL: ugt_55_v4i64:
18512 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18513 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18514 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18515 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [55,55,55,55]
18516 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18517 ; BITALG-NEXT: retq
18518 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18519 %3 = icmp ugt <4 x i64> %2, <i64 55, i64 55, i64 55, i64 55>
18520 %4 = sext <4 x i1> %3 to <4 x i64>
18524 define <4 x i64> @ult_56_v4i64(<4 x i64> %0) {
18525 ; AVX1-LABEL: ult_56_v4i64:
18527 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18528 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18529 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18530 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18531 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18532 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18533 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18534 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18535 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18536 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18537 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18538 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18539 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18540 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18541 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18542 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18543 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18544 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18545 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [56,56]
18546 ; AVX1-NEXT: # xmm1 = mem[0,0]
18547 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
18548 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
18549 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18552 ; AVX2-LABEL: ult_56_v4i64:
18554 ; AVX2-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]
18555 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18556 ; AVX2-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]
18557 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18558 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18559 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18560 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18561 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18562 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18563 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18564 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18565 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [56,56,56,56]
18566 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18569 ; AVX512VPOPCNTDQ-LABEL: ult_56_v4i64:
18570 ; AVX512VPOPCNTDQ: # %bb.0:
18571 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18572 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18573 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [56,56,56,56]
18574 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18575 ; AVX512VPOPCNTDQ-NEXT: retq
18577 ; AVX512VPOPCNTDQVL-LABEL: ult_56_v4i64:
18578 ; AVX512VPOPCNTDQVL: # %bb.0:
18579 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18580 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [56,56,56,56]
18581 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18582 ; AVX512VPOPCNTDQVL-NEXT: retq
18584 ; BITALG_NOVLX-LABEL: ult_56_v4i64:
18585 ; BITALG_NOVLX: # %bb.0:
18586 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18587 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18588 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18589 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18590 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [56,56,56,56]
18591 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18592 ; BITALG_NOVLX-NEXT: retq
18594 ; BITALG-LABEL: ult_56_v4i64:
18596 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18597 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18598 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18599 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [56,56,56,56]
18600 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18601 ; BITALG-NEXT: retq
18602 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18603 %3 = icmp ult <4 x i64> %2, <i64 56, i64 56, i64 56, i64 56>
18604 %4 = sext <4 x i1> %3 to <4 x i64>
18608 define <4 x i64> @ugt_56_v4i64(<4 x i64> %0) {
18609 ; AVX1-LABEL: ugt_56_v4i64:
18611 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18612 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18613 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18614 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18615 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18616 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18617 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18618 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18619 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18620 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18621 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18622 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18623 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18624 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18625 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18626 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18627 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18628 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18629 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [56,56]
18630 ; AVX1-NEXT: # xmm1 = mem[0,0]
18631 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
18632 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
18633 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18636 ; AVX2-LABEL: ugt_56_v4i64:
18638 ; AVX2-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]
18639 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18640 ; AVX2-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]
18641 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18642 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18643 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18644 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18645 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18646 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18647 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18648 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18649 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [56,56,56,56]
18650 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18653 ; AVX512VPOPCNTDQ-LABEL: ugt_56_v4i64:
18654 ; AVX512VPOPCNTDQ: # %bb.0:
18655 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18656 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18657 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [56,56,56,56]
18658 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18659 ; AVX512VPOPCNTDQ-NEXT: retq
18661 ; AVX512VPOPCNTDQVL-LABEL: ugt_56_v4i64:
18662 ; AVX512VPOPCNTDQVL: # %bb.0:
18663 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18664 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [56,56,56,56]
18665 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18666 ; AVX512VPOPCNTDQVL-NEXT: retq
18668 ; BITALG_NOVLX-LABEL: ugt_56_v4i64:
18669 ; BITALG_NOVLX: # %bb.0:
18670 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18671 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18672 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18673 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18674 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [56,56,56,56]
18675 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18676 ; BITALG_NOVLX-NEXT: retq
18678 ; BITALG-LABEL: ugt_56_v4i64:
18680 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18681 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18682 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18683 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [56,56,56,56]
18684 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18685 ; BITALG-NEXT: retq
18686 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18687 %3 = icmp ugt <4 x i64> %2, <i64 56, i64 56, i64 56, i64 56>
18688 %4 = sext <4 x i1> %3 to <4 x i64>
18692 define <4 x i64> @ult_57_v4i64(<4 x i64> %0) {
18693 ; AVX1-LABEL: ult_57_v4i64:
18695 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18696 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18697 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18698 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18699 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18700 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18701 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18702 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18703 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18704 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18705 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18706 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18707 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18708 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18709 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18710 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18711 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18712 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18713 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [57,57]
18714 ; AVX1-NEXT: # xmm1 = mem[0,0]
18715 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
18716 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
18717 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18720 ; AVX2-LABEL: ult_57_v4i64:
18722 ; AVX2-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]
18723 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18724 ; AVX2-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]
18725 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18726 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18727 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18728 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18729 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18730 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18731 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18732 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18733 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [57,57,57,57]
18734 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18737 ; AVX512VPOPCNTDQ-LABEL: ult_57_v4i64:
18738 ; AVX512VPOPCNTDQ: # %bb.0:
18739 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18740 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18741 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [57,57,57,57]
18742 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18743 ; AVX512VPOPCNTDQ-NEXT: retq
18745 ; AVX512VPOPCNTDQVL-LABEL: ult_57_v4i64:
18746 ; AVX512VPOPCNTDQVL: # %bb.0:
18747 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18748 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [57,57,57,57]
18749 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18750 ; AVX512VPOPCNTDQVL-NEXT: retq
18752 ; BITALG_NOVLX-LABEL: ult_57_v4i64:
18753 ; BITALG_NOVLX: # %bb.0:
18754 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18755 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18756 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18757 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18758 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [57,57,57,57]
18759 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18760 ; BITALG_NOVLX-NEXT: retq
18762 ; BITALG-LABEL: ult_57_v4i64:
18764 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18765 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18766 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18767 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [57,57,57,57]
18768 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18769 ; BITALG-NEXT: retq
18770 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18771 %3 = icmp ult <4 x i64> %2, <i64 57, i64 57, i64 57, i64 57>
18772 %4 = sext <4 x i1> %3 to <4 x i64>
18776 define <4 x i64> @ugt_57_v4i64(<4 x i64> %0) {
18777 ; AVX1-LABEL: ugt_57_v4i64:
18779 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18780 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18781 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18782 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18783 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18784 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18785 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18786 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18787 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18788 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18789 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18790 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18791 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18792 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18793 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18794 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18795 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18796 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18797 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [57,57]
18798 ; AVX1-NEXT: # xmm1 = mem[0,0]
18799 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
18800 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
18801 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18804 ; AVX2-LABEL: ugt_57_v4i64:
18806 ; AVX2-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]
18807 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18808 ; AVX2-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]
18809 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18810 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18811 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18812 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18813 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18814 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18815 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18816 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18817 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [57,57,57,57]
18818 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18821 ; AVX512VPOPCNTDQ-LABEL: ugt_57_v4i64:
18822 ; AVX512VPOPCNTDQ: # %bb.0:
18823 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18824 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18825 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [57,57,57,57]
18826 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18827 ; AVX512VPOPCNTDQ-NEXT: retq
18829 ; AVX512VPOPCNTDQVL-LABEL: ugt_57_v4i64:
18830 ; AVX512VPOPCNTDQVL: # %bb.0:
18831 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18832 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [57,57,57,57]
18833 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18834 ; AVX512VPOPCNTDQVL-NEXT: retq
18836 ; BITALG_NOVLX-LABEL: ugt_57_v4i64:
18837 ; BITALG_NOVLX: # %bb.0:
18838 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18839 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18840 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18841 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18842 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [57,57,57,57]
18843 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18844 ; BITALG_NOVLX-NEXT: retq
18846 ; BITALG-LABEL: ugt_57_v4i64:
18848 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18849 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18850 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18851 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [57,57,57,57]
18852 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18853 ; BITALG-NEXT: retq
18854 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18855 %3 = icmp ugt <4 x i64> %2, <i64 57, i64 57, i64 57, i64 57>
18856 %4 = sext <4 x i1> %3 to <4 x i64>
18860 define <4 x i64> @ult_58_v4i64(<4 x i64> %0) {
18861 ; AVX1-LABEL: ult_58_v4i64:
18863 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18864 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18865 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18866 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18867 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18868 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18869 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18870 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18871 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18872 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18873 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18874 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18875 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18876 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18877 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18878 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18879 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18880 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18881 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [58,58]
18882 ; AVX1-NEXT: # xmm1 = mem[0,0]
18883 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
18884 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
18885 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18888 ; AVX2-LABEL: ult_58_v4i64:
18890 ; AVX2-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]
18891 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18892 ; AVX2-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]
18893 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18894 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18895 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18896 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18897 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18898 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18899 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18900 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18901 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [58,58,58,58]
18902 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18905 ; AVX512VPOPCNTDQ-LABEL: ult_58_v4i64:
18906 ; AVX512VPOPCNTDQ: # %bb.0:
18907 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18908 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18909 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [58,58,58,58]
18910 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18911 ; AVX512VPOPCNTDQ-NEXT: retq
18913 ; AVX512VPOPCNTDQVL-LABEL: ult_58_v4i64:
18914 ; AVX512VPOPCNTDQVL: # %bb.0:
18915 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
18916 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [58,58,58,58]
18917 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18918 ; AVX512VPOPCNTDQVL-NEXT: retq
18920 ; BITALG_NOVLX-LABEL: ult_58_v4i64:
18921 ; BITALG_NOVLX: # %bb.0:
18922 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18923 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
18924 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
18925 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18926 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [58,58,58,58]
18927 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18928 ; BITALG_NOVLX-NEXT: retq
18930 ; BITALG-LABEL: ult_58_v4i64:
18932 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
18933 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
18934 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18935 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [58,58,58,58]
18936 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
18937 ; BITALG-NEXT: retq
18938 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
18939 %3 = icmp ult <4 x i64> %2, <i64 58, i64 58, i64 58, i64 58>
18940 %4 = sext <4 x i1> %3 to <4 x i64>
18944 define <4 x i64> @ugt_58_v4i64(<4 x i64> %0) {
18945 ; AVX1-LABEL: ugt_58_v4i64:
18947 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
18948 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
18949 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
18950 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
18951 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
18952 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
18953 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
18954 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
18955 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
18956 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
18957 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
18958 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
18959 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
18960 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
18961 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
18962 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
18963 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
18964 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
18965 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [58,58]
18966 ; AVX1-NEXT: # xmm1 = mem[0,0]
18967 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
18968 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
18969 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
18972 ; AVX2-LABEL: ugt_58_v4i64:
18974 ; AVX2-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]
18975 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
18976 ; AVX2-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]
18977 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
18978 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
18979 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
18980 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
18981 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
18982 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
18983 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
18984 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
18985 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [58,58,58,58]
18986 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18989 ; AVX512VPOPCNTDQ-LABEL: ugt_58_v4i64:
18990 ; AVX512VPOPCNTDQ: # %bb.0:
18991 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
18992 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
18993 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [58,58,58,58]
18994 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
18995 ; AVX512VPOPCNTDQ-NEXT: retq
18997 ; AVX512VPOPCNTDQVL-LABEL: ugt_58_v4i64:
18998 ; AVX512VPOPCNTDQVL: # %bb.0:
18999 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
19000 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [58,58,58,58]
19001 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19002 ; AVX512VPOPCNTDQVL-NEXT: retq
19004 ; BITALG_NOVLX-LABEL: ugt_58_v4i64:
19005 ; BITALG_NOVLX: # %bb.0:
19006 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19007 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
19008 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
19009 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19010 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [58,58,58,58]
19011 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19012 ; BITALG_NOVLX-NEXT: retq
19014 ; BITALG-LABEL: ugt_58_v4i64:
19016 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
19017 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
19018 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19019 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [58,58,58,58]
19020 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19021 ; BITALG-NEXT: retq
19022 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
19023 %3 = icmp ugt <4 x i64> %2, <i64 58, i64 58, i64 58, i64 58>
19024 %4 = sext <4 x i1> %3 to <4 x i64>
19028 define <4 x i64> @ult_59_v4i64(<4 x i64> %0) {
19029 ; AVX1-LABEL: ult_59_v4i64:
19031 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
19032 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
19033 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
19034 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
19035 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
19036 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
19037 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
19038 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
19039 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
19040 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
19041 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
19042 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
19043 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
19044 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
19045 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
19046 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
19047 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
19048 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
19049 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [59,59]
19050 ; AVX1-NEXT: # xmm1 = mem[0,0]
19051 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
19052 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
19053 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
19056 ; AVX2-LABEL: ult_59_v4i64:
19058 ; AVX2-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]
19059 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
19060 ; AVX2-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]
19061 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
19062 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
19063 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
19064 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
19065 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
19066 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
19067 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
19068 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19069 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [59,59,59,59]
19070 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19073 ; AVX512VPOPCNTDQ-LABEL: ult_59_v4i64:
19074 ; AVX512VPOPCNTDQ: # %bb.0:
19075 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19076 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
19077 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [59,59,59,59]
19078 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19079 ; AVX512VPOPCNTDQ-NEXT: retq
19081 ; AVX512VPOPCNTDQVL-LABEL: ult_59_v4i64:
19082 ; AVX512VPOPCNTDQVL: # %bb.0:
19083 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
19084 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [59,59,59,59]
19085 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19086 ; AVX512VPOPCNTDQVL-NEXT: retq
19088 ; BITALG_NOVLX-LABEL: ult_59_v4i64:
19089 ; BITALG_NOVLX: # %bb.0:
19090 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19091 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
19092 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
19093 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19094 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [59,59,59,59]
19095 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19096 ; BITALG_NOVLX-NEXT: retq
19098 ; BITALG-LABEL: ult_59_v4i64:
19100 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
19101 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
19102 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19103 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [59,59,59,59]
19104 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19105 ; BITALG-NEXT: retq
19106 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
19107 %3 = icmp ult <4 x i64> %2, <i64 59, i64 59, i64 59, i64 59>
19108 %4 = sext <4 x i1> %3 to <4 x i64>
19112 define <4 x i64> @ugt_59_v4i64(<4 x i64> %0) {
19113 ; AVX1-LABEL: ugt_59_v4i64:
19115 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
19116 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
19117 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
19118 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
19119 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
19120 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
19121 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
19122 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
19123 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
19124 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
19125 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
19126 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
19127 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
19128 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
19129 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
19130 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
19131 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
19132 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
19133 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [59,59]
19134 ; AVX1-NEXT: # xmm1 = mem[0,0]
19135 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
19136 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
19137 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
19140 ; AVX2-LABEL: ugt_59_v4i64:
19142 ; AVX2-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]
19143 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
19144 ; AVX2-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]
19145 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
19146 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
19147 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
19148 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
19149 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
19150 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
19151 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
19152 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19153 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [59,59,59,59]
19154 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19157 ; AVX512VPOPCNTDQ-LABEL: ugt_59_v4i64:
19158 ; AVX512VPOPCNTDQ: # %bb.0:
19159 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19160 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
19161 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [59,59,59,59]
19162 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19163 ; AVX512VPOPCNTDQ-NEXT: retq
19165 ; AVX512VPOPCNTDQVL-LABEL: ugt_59_v4i64:
19166 ; AVX512VPOPCNTDQVL: # %bb.0:
19167 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
19168 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [59,59,59,59]
19169 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19170 ; AVX512VPOPCNTDQVL-NEXT: retq
19172 ; BITALG_NOVLX-LABEL: ugt_59_v4i64:
19173 ; BITALG_NOVLX: # %bb.0:
19174 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19175 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
19176 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
19177 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19178 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [59,59,59,59]
19179 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19180 ; BITALG_NOVLX-NEXT: retq
19182 ; BITALG-LABEL: ugt_59_v4i64:
19184 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
19185 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
19186 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19187 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [59,59,59,59]
19188 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19189 ; BITALG-NEXT: retq
19190 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
19191 %3 = icmp ugt <4 x i64> %2, <i64 59, i64 59, i64 59, i64 59>
19192 %4 = sext <4 x i1> %3 to <4 x i64>
19196 define <4 x i64> @ult_60_v4i64(<4 x i64> %0) {
19197 ; AVX1-LABEL: ult_60_v4i64:
19199 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
19200 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
19201 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
19202 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
19203 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
19204 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
19205 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
19206 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
19207 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
19208 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
19209 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
19210 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
19211 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
19212 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
19213 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
19214 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
19215 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
19216 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
19217 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [60,60]
19218 ; AVX1-NEXT: # xmm1 = mem[0,0]
19219 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
19220 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
19221 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
19224 ; AVX2-LABEL: ult_60_v4i64:
19226 ; AVX2-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]
19227 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
19228 ; AVX2-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]
19229 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
19230 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
19231 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
19232 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
19233 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
19234 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
19235 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
19236 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19237 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [60,60,60,60]
19238 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19241 ; AVX512VPOPCNTDQ-LABEL: ult_60_v4i64:
19242 ; AVX512VPOPCNTDQ: # %bb.0:
19243 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19244 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
19245 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [60,60,60,60]
19246 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19247 ; AVX512VPOPCNTDQ-NEXT: retq
19249 ; AVX512VPOPCNTDQVL-LABEL: ult_60_v4i64:
19250 ; AVX512VPOPCNTDQVL: # %bb.0:
19251 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
19252 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [60,60,60,60]
19253 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19254 ; AVX512VPOPCNTDQVL-NEXT: retq
19256 ; BITALG_NOVLX-LABEL: ult_60_v4i64:
19257 ; BITALG_NOVLX: # %bb.0:
19258 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19259 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
19260 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
19261 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19262 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [60,60,60,60]
19263 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19264 ; BITALG_NOVLX-NEXT: retq
19266 ; BITALG-LABEL: ult_60_v4i64:
19268 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
19269 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
19270 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19271 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [60,60,60,60]
19272 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19273 ; BITALG-NEXT: retq
19274 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
19275 %3 = icmp ult <4 x i64> %2, <i64 60, i64 60, i64 60, i64 60>
19276 %4 = sext <4 x i1> %3 to <4 x i64>
19280 define <4 x i64> @ugt_60_v4i64(<4 x i64> %0) {
19281 ; AVX1-LABEL: ugt_60_v4i64:
19283 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
19284 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
19285 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
19286 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
19287 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
19288 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
19289 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
19290 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
19291 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
19292 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
19293 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
19294 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
19295 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
19296 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
19297 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
19298 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
19299 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
19300 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
19301 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [60,60]
19302 ; AVX1-NEXT: # xmm1 = mem[0,0]
19303 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
19304 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
19305 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
19308 ; AVX2-LABEL: ugt_60_v4i64:
19310 ; AVX2-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]
19311 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
19312 ; AVX2-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]
19313 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
19314 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
19315 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
19316 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
19317 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
19318 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
19319 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
19320 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19321 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [60,60,60,60]
19322 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19325 ; AVX512VPOPCNTDQ-LABEL: ugt_60_v4i64:
19326 ; AVX512VPOPCNTDQ: # %bb.0:
19327 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19328 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
19329 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [60,60,60,60]
19330 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19331 ; AVX512VPOPCNTDQ-NEXT: retq
19333 ; AVX512VPOPCNTDQVL-LABEL: ugt_60_v4i64:
19334 ; AVX512VPOPCNTDQVL: # %bb.0:
19335 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
19336 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [60,60,60,60]
19337 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19338 ; AVX512VPOPCNTDQVL-NEXT: retq
19340 ; BITALG_NOVLX-LABEL: ugt_60_v4i64:
19341 ; BITALG_NOVLX: # %bb.0:
19342 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19343 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
19344 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
19345 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19346 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [60,60,60,60]
19347 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19348 ; BITALG_NOVLX-NEXT: retq
19350 ; BITALG-LABEL: ugt_60_v4i64:
19352 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
19353 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
19354 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19355 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [60,60,60,60]
19356 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19357 ; BITALG-NEXT: retq
19358 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
19359 %3 = icmp ugt <4 x i64> %2, <i64 60, i64 60, i64 60, i64 60>
19360 %4 = sext <4 x i1> %3 to <4 x i64>
19364 define <4 x i64> @ult_61_v4i64(<4 x i64> %0) {
19365 ; AVX1-LABEL: ult_61_v4i64:
19367 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
19368 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
19369 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
19370 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
19371 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
19372 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
19373 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
19374 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
19375 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
19376 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
19377 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
19378 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
19379 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
19380 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
19381 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
19382 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
19383 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
19384 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
19385 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [61,61]
19386 ; AVX1-NEXT: # xmm1 = mem[0,0]
19387 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
19388 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
19389 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
19392 ; AVX2-LABEL: ult_61_v4i64:
19394 ; AVX2-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]
19395 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
19396 ; AVX2-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]
19397 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
19398 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
19399 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
19400 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
19401 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
19402 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
19403 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
19404 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19405 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [61,61,61,61]
19406 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19409 ; AVX512VPOPCNTDQ-LABEL: ult_61_v4i64:
19410 ; AVX512VPOPCNTDQ: # %bb.0:
19411 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19412 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
19413 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [61,61,61,61]
19414 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19415 ; AVX512VPOPCNTDQ-NEXT: retq
19417 ; AVX512VPOPCNTDQVL-LABEL: ult_61_v4i64:
19418 ; AVX512VPOPCNTDQVL: # %bb.0:
19419 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
19420 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [61,61,61,61]
19421 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19422 ; AVX512VPOPCNTDQVL-NEXT: retq
19424 ; BITALG_NOVLX-LABEL: ult_61_v4i64:
19425 ; BITALG_NOVLX: # %bb.0:
19426 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19427 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
19428 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
19429 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19430 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [61,61,61,61]
19431 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19432 ; BITALG_NOVLX-NEXT: retq
19434 ; BITALG-LABEL: ult_61_v4i64:
19436 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
19437 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
19438 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19439 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [61,61,61,61]
19440 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19441 ; BITALG-NEXT: retq
19442 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
19443 %3 = icmp ult <4 x i64> %2, <i64 61, i64 61, i64 61, i64 61>
19444 %4 = sext <4 x i1> %3 to <4 x i64>
19448 define <4 x i64> @ugt_61_v4i64(<4 x i64> %0) {
19449 ; AVX1-LABEL: ugt_61_v4i64:
19451 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
19452 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
19453 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
19454 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
19455 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
19456 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
19457 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
19458 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
19459 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
19460 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
19461 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
19462 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
19463 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
19464 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
19465 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
19466 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
19467 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
19468 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
19469 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [61,61]
19470 ; AVX1-NEXT: # xmm1 = mem[0,0]
19471 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
19472 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
19473 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
19476 ; AVX2-LABEL: ugt_61_v4i64:
19478 ; AVX2-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]
19479 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
19480 ; AVX2-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]
19481 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
19482 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
19483 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
19484 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
19485 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
19486 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
19487 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
19488 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19489 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [61,61,61,61]
19490 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19493 ; AVX512VPOPCNTDQ-LABEL: ugt_61_v4i64:
19494 ; AVX512VPOPCNTDQ: # %bb.0:
19495 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19496 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
19497 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [61,61,61,61]
19498 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19499 ; AVX512VPOPCNTDQ-NEXT: retq
19501 ; AVX512VPOPCNTDQVL-LABEL: ugt_61_v4i64:
19502 ; AVX512VPOPCNTDQVL: # %bb.0:
19503 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
19504 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [61,61,61,61]
19505 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19506 ; AVX512VPOPCNTDQVL-NEXT: retq
19508 ; BITALG_NOVLX-LABEL: ugt_61_v4i64:
19509 ; BITALG_NOVLX: # %bb.0:
19510 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19511 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
19512 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
19513 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19514 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [61,61,61,61]
19515 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19516 ; BITALG_NOVLX-NEXT: retq
19518 ; BITALG-LABEL: ugt_61_v4i64:
19520 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
19521 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
19522 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19523 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [61,61,61,61]
19524 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19525 ; BITALG-NEXT: retq
19526 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
19527 %3 = icmp ugt <4 x i64> %2, <i64 61, i64 61, i64 61, i64 61>
19528 %4 = sext <4 x i1> %3 to <4 x i64>
19532 define <4 x i64> @ult_62_v4i64(<4 x i64> %0) {
19533 ; AVX1-LABEL: ult_62_v4i64:
19535 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
19536 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
19537 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
19538 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
19539 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
19540 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
19541 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
19542 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
19543 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
19544 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
19545 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
19546 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
19547 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
19548 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
19549 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
19550 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
19551 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
19552 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
19553 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [62,62]
19554 ; AVX1-NEXT: # xmm1 = mem[0,0]
19555 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
19556 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
19557 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
19560 ; AVX2-LABEL: ult_62_v4i64:
19562 ; AVX2-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]
19563 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
19564 ; AVX2-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]
19565 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
19566 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
19567 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
19568 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
19569 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
19570 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
19571 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
19572 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19573 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [62,62,62,62]
19574 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19577 ; AVX512VPOPCNTDQ-LABEL: ult_62_v4i64:
19578 ; AVX512VPOPCNTDQ: # %bb.0:
19579 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19580 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
19581 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [62,62,62,62]
19582 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19583 ; AVX512VPOPCNTDQ-NEXT: retq
19585 ; AVX512VPOPCNTDQVL-LABEL: ult_62_v4i64:
19586 ; AVX512VPOPCNTDQVL: # %bb.0:
19587 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
19588 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [62,62,62,62]
19589 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19590 ; AVX512VPOPCNTDQVL-NEXT: retq
19592 ; BITALG_NOVLX-LABEL: ult_62_v4i64:
19593 ; BITALG_NOVLX: # %bb.0:
19594 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19595 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
19596 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
19597 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19598 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [62,62,62,62]
19599 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19600 ; BITALG_NOVLX-NEXT: retq
19602 ; BITALG-LABEL: ult_62_v4i64:
19604 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
19605 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
19606 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19607 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [62,62,62,62]
19608 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19609 ; BITALG-NEXT: retq
19610 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
19611 %3 = icmp ult <4 x i64> %2, <i64 62, i64 62, i64 62, i64 62>
19612 %4 = sext <4 x i1> %3 to <4 x i64>
19616 define <4 x i64> @ugt_62_v4i64(<4 x i64> %0) {
19617 ; AVX1-LABEL: ugt_62_v4i64:
19619 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
19620 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
19621 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
19622 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
19623 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
19624 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
19625 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
19626 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
19627 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
19628 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
19629 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
19630 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
19631 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
19632 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
19633 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
19634 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
19635 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
19636 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
19637 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [62,62]
19638 ; AVX1-NEXT: # xmm1 = mem[0,0]
19639 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm0, %xmm0
19640 ; AVX1-NEXT: vpcmpgtq %xmm1, %xmm2, %xmm1
19641 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
19644 ; AVX2-LABEL: ugt_62_v4i64:
19646 ; AVX2-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]
19647 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
19648 ; AVX2-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]
19649 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
19650 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
19651 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
19652 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
19653 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
19654 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
19655 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
19656 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19657 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [62,62,62,62]
19658 ; AVX2-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19661 ; AVX512VPOPCNTDQ-LABEL: ugt_62_v4i64:
19662 ; AVX512VPOPCNTDQ: # %bb.0:
19663 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19664 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
19665 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [62,62,62,62]
19666 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19667 ; AVX512VPOPCNTDQ-NEXT: retq
19669 ; AVX512VPOPCNTDQVL-LABEL: ugt_62_v4i64:
19670 ; AVX512VPOPCNTDQVL: # %bb.0:
19671 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
19672 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [62,62,62,62]
19673 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19674 ; AVX512VPOPCNTDQVL-NEXT: retq
19676 ; BITALG_NOVLX-LABEL: ugt_62_v4i64:
19677 ; BITALG_NOVLX: # %bb.0:
19678 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19679 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
19680 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
19681 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19682 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [62,62,62,62]
19683 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19684 ; BITALG_NOVLX-NEXT: retq
19686 ; BITALG-LABEL: ugt_62_v4i64:
19688 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
19689 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
19690 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19691 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [62,62,62,62]
19692 ; BITALG-NEXT: vpcmpgtq %ymm1, %ymm0, %ymm0
19693 ; BITALG-NEXT: retq
19694 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
19695 %3 = icmp ugt <4 x i64> %2, <i64 62, i64 62, i64 62, i64 62>
19696 %4 = sext <4 x i1> %3 to <4 x i64>
19700 define <4 x i64> @ult_63_v4i64(<4 x i64> %0) {
19701 ; AVX1-LABEL: ult_63_v4i64:
19703 ; AVX1-NEXT: vbroadcastss {{.*#+}} xmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
19704 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm2
19705 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
19706 ; AVX1-NEXT: vpshufb %xmm2, %xmm3, %xmm2
19707 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm4
19708 ; AVX1-NEXT: vpand %xmm1, %xmm4, %xmm4
19709 ; AVX1-NEXT: vpshufb %xmm4, %xmm3, %xmm4
19710 ; AVX1-NEXT: vpaddb %xmm2, %xmm4, %xmm2
19711 ; AVX1-NEXT: vpxor %xmm4, %xmm4, %xmm4
19712 ; AVX1-NEXT: vpsadbw %xmm4, %xmm2, %xmm2
19713 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
19714 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm5
19715 ; AVX1-NEXT: vpshufb %xmm5, %xmm3, %xmm5
19716 ; AVX1-NEXT: vpsrlw $4, %xmm0, %xmm0
19717 ; AVX1-NEXT: vpand %xmm1, %xmm0, %xmm0
19718 ; AVX1-NEXT: vpshufb %xmm0, %xmm3, %xmm0
19719 ; AVX1-NEXT: vpaddb %xmm5, %xmm0, %xmm0
19720 ; AVX1-NEXT: vpsadbw %xmm4, %xmm0, %xmm0
19721 ; AVX1-NEXT: vmovddup {{.*#+}} xmm1 = [63,63]
19722 ; AVX1-NEXT: # xmm1 = mem[0,0]
19723 ; AVX1-NEXT: vpcmpgtq %xmm0, %xmm1, %xmm0
19724 ; AVX1-NEXT: vpcmpgtq %xmm2, %xmm1, %xmm1
19725 ; AVX1-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
19728 ; AVX2-LABEL: ult_63_v4i64:
19730 ; AVX2-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]
19731 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm2
19732 ; AVX2-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]
19733 ; AVX2-NEXT: # ymm3 = mem[0,1,0,1]
19734 ; AVX2-NEXT: vpshufb %ymm2, %ymm3, %ymm2
19735 ; AVX2-NEXT: vpsrlw $4, %ymm0, %ymm0
19736 ; AVX2-NEXT: vpand %ymm1, %ymm0, %ymm0
19737 ; AVX2-NEXT: vpshufb %ymm0, %ymm3, %ymm0
19738 ; AVX2-NEXT: vpaddb %ymm2, %ymm0, %ymm0
19739 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
19740 ; AVX2-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19741 ; AVX2-NEXT: vpbroadcastq {{.*#+}} ymm1 = [63,63,63,63]
19742 ; AVX2-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19745 ; AVX512VPOPCNTDQ-LABEL: ult_63_v4i64:
19746 ; AVX512VPOPCNTDQ: # %bb.0:
19747 ; AVX512VPOPCNTDQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19748 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
19749 ; AVX512VPOPCNTDQ-NEXT: vpbroadcastq {{.*#+}} ymm1 = [63,63,63,63]
19750 ; AVX512VPOPCNTDQ-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19751 ; AVX512VPOPCNTDQ-NEXT: retq
19753 ; AVX512VPOPCNTDQVL-LABEL: ult_63_v4i64:
19754 ; AVX512VPOPCNTDQVL: # %bb.0:
19755 ; AVX512VPOPCNTDQVL-NEXT: vpopcntq %ymm0, %ymm0
19756 ; AVX512VPOPCNTDQVL-NEXT: vpbroadcastq {{.*#+}} ymm1 = [63,63,63,63]
19757 ; AVX512VPOPCNTDQVL-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19758 ; AVX512VPOPCNTDQVL-NEXT: retq
19760 ; BITALG_NOVLX-LABEL: ult_63_v4i64:
19761 ; BITALG_NOVLX: # %bb.0:
19762 ; BITALG_NOVLX-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
19763 ; BITALG_NOVLX-NEXT: vpopcntb %zmm0, %zmm0
19764 ; BITALG_NOVLX-NEXT: vpxor %xmm1, %xmm1, %xmm1
19765 ; BITALG_NOVLX-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19766 ; BITALG_NOVLX-NEXT: vpbroadcastq {{.*#+}} ymm1 = [63,63,63,63]
19767 ; BITALG_NOVLX-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19768 ; BITALG_NOVLX-NEXT: retq
19770 ; BITALG-LABEL: ult_63_v4i64:
19772 ; BITALG-NEXT: vpopcntb %ymm0, %ymm0
19773 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
19774 ; BITALG-NEXT: vpsadbw %ymm1, %ymm0, %ymm0
19775 ; BITALG-NEXT: vpbroadcastq {{.*#+}} ymm1 = [63,63,63,63]
19776 ; BITALG-NEXT: vpcmpgtq %ymm0, %ymm1, %ymm0
19777 ; BITALG-NEXT: retq
19778 %2 = tail call <4 x i64> @llvm.ctpop.v4i64(<4 x i64> %0)
19779 %3 = icmp ult <4 x i64> %2, <i64 63, i64 63, i64 63, i64 63>
19780 %4 = sext <4 x i1> %3 to <4 x i64>
19784 declare <32 x i8> @llvm.ctpop.v32i8(<32 x i8>)
19785 declare <16 x i16> @llvm.ctpop.v16i16(<16 x i16>)
19786 declare <8 x i32> @llvm.ctpop.v8i32(<8 x i32>)
19787 declare <4 x i64> @llvm.ctpop.v4i64(<4 x i64>)