1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=SSE,SSE2
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse4.1 | FileCheck %s --check-prefixes=SSE,SSE41
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2
6 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefixes=AVX512,AVX512F
7 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=AVX512,AVX512BW
8 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl | FileCheck %s --check-prefixes=AVX512,AVX512VL
14 define i1 @trunc_v2i64_v2i1(<2 x i64>) {
15 ; SSE-LABEL: trunc_v2i64_v2i1:
17 ; SSE-NEXT: psllq $63, %xmm0
18 ; SSE-NEXT: movmskpd %xmm0, %eax
19 ; SSE-NEXT: xorb $0, %al
23 ; AVX-LABEL: trunc_v2i64_v2i1:
25 ; AVX-NEXT: vpsllq $63, %xmm0, %xmm0
26 ; AVX-NEXT: vmovmskpd %xmm0, %eax
27 ; AVX-NEXT: xorb $0, %al
31 ; AVX512F-LABEL: trunc_v2i64_v2i1:
33 ; AVX512F-NEXT: vpsllq $63, %xmm0, %xmm0
34 ; AVX512F-NEXT: vptestmq %zmm0, %zmm0, %k0
35 ; AVX512F-NEXT: kmovw %k0, %eax
36 ; AVX512F-NEXT: andl $3, %eax
37 ; AVX512F-NEXT: xorb $0, %al
38 ; AVX512F-NEXT: setnp %al
39 ; AVX512F-NEXT: vzeroupper
42 ; AVX512BW-LABEL: trunc_v2i64_v2i1:
44 ; AVX512BW-NEXT: vpsllq $63, %xmm0, %xmm0
45 ; AVX512BW-NEXT: vptestmq %zmm0, %zmm0, %k0
46 ; AVX512BW-NEXT: kmovd %k0, %eax
47 ; AVX512BW-NEXT: andl $3, %eax
48 ; AVX512BW-NEXT: xorb $0, %al
49 ; AVX512BW-NEXT: setnp %al
50 ; AVX512BW-NEXT: vzeroupper
53 ; AVX512VL-LABEL: trunc_v2i64_v2i1:
55 ; AVX512VL-NEXT: vpsllq $63, %xmm0, %xmm0
56 ; AVX512VL-NEXT: vptestmq %xmm0, %xmm0, %k0
57 ; AVX512VL-NEXT: kmovd %k0, %eax
58 ; AVX512VL-NEXT: andl $3, %eax
59 ; AVX512VL-NEXT: xorb $0, %al
60 ; AVX512VL-NEXT: setnp %al
62 %a = trunc <2 x i64> %0 to <2 x i1>
63 %b = call i1 @llvm.experimental.vector.reduce.xor.v2i1(<2 x i1> %a)
67 define i1 @trunc_v4i32_v4i1(<4 x i32>) {
68 ; SSE-LABEL: trunc_v4i32_v4i1:
70 ; SSE-NEXT: pslld $31, %xmm0
71 ; SSE-NEXT: movmskps %xmm0, %eax
72 ; SSE-NEXT: xorb $0, %al
76 ; AVX-LABEL: trunc_v4i32_v4i1:
78 ; AVX-NEXT: vpslld $31, %xmm0, %xmm0
79 ; AVX-NEXT: vmovmskps %xmm0, %eax
80 ; AVX-NEXT: xorb $0, %al
84 ; AVX512F-LABEL: trunc_v4i32_v4i1:
86 ; AVX512F-NEXT: vpslld $31, %xmm0, %xmm0
87 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
88 ; AVX512F-NEXT: kmovw %k0, %eax
89 ; AVX512F-NEXT: andl $15, %eax
90 ; AVX512F-NEXT: xorb $0, %al
91 ; AVX512F-NEXT: setnp %al
92 ; AVX512F-NEXT: vzeroupper
95 ; AVX512BW-LABEL: trunc_v4i32_v4i1:
97 ; AVX512BW-NEXT: vpslld $31, %xmm0, %xmm0
98 ; AVX512BW-NEXT: vptestmd %zmm0, %zmm0, %k0
99 ; AVX512BW-NEXT: kmovd %k0, %eax
100 ; AVX512BW-NEXT: andl $15, %eax
101 ; AVX512BW-NEXT: xorb $0, %al
102 ; AVX512BW-NEXT: setnp %al
103 ; AVX512BW-NEXT: vzeroupper
104 ; AVX512BW-NEXT: retq
106 ; AVX512VL-LABEL: trunc_v4i32_v4i1:
108 ; AVX512VL-NEXT: vpslld $31, %xmm0, %xmm0
109 ; AVX512VL-NEXT: vptestmd %xmm0, %xmm0, %k0
110 ; AVX512VL-NEXT: kmovd %k0, %eax
111 ; AVX512VL-NEXT: andl $15, %eax
112 ; AVX512VL-NEXT: xorb $0, %al
113 ; AVX512VL-NEXT: setnp %al
114 ; AVX512VL-NEXT: retq
115 %a = trunc <4 x i32> %0 to <4 x i1>
116 %b = call i1 @llvm.experimental.vector.reduce.xor.v4i1(<4 x i1> %a)
120 define i1 @trunc_v8i16_v8i1(<8 x i8>) {
121 ; SSE-LABEL: trunc_v8i16_v8i1:
123 ; SSE-NEXT: psllw $15, %xmm0
124 ; SSE-NEXT: packsswb %xmm0, %xmm0
125 ; SSE-NEXT: pmovmskb %xmm0, %eax
126 ; SSE-NEXT: xorb $0, %al
127 ; SSE-NEXT: setnp %al
130 ; AVX-LABEL: trunc_v8i16_v8i1:
132 ; AVX-NEXT: vpsllw $15, %xmm0, %xmm0
133 ; AVX-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
134 ; AVX-NEXT: vpmovmskb %xmm0, %eax
135 ; AVX-NEXT: xorb $0, %al
136 ; AVX-NEXT: setnp %al
139 ; AVX512F-LABEL: trunc_v8i16_v8i1:
141 ; AVX512F-NEXT: vpmovsxwq %xmm0, %zmm0
142 ; AVX512F-NEXT: vpsllq $63, %zmm0, %zmm0
143 ; AVX512F-NEXT: vptestmq %zmm0, %zmm0, %k0
144 ; AVX512F-NEXT: kmovw %k0, %eax
145 ; AVX512F-NEXT: xorb $0, %al
146 ; AVX512F-NEXT: setnp %al
147 ; AVX512F-NEXT: vzeroupper
150 ; AVX512BW-LABEL: trunc_v8i16_v8i1:
152 ; AVX512BW-NEXT: vpsllw $15, %xmm0, %xmm0
153 ; AVX512BW-NEXT: vpmovw2m %zmm0, %k0
154 ; AVX512BW-NEXT: kmovd %k0, %eax
155 ; AVX512BW-NEXT: xorb $0, %al
156 ; AVX512BW-NEXT: setnp %al
157 ; AVX512BW-NEXT: vzeroupper
158 ; AVX512BW-NEXT: retq
160 ; AVX512VL-LABEL: trunc_v8i16_v8i1:
162 ; AVX512VL-NEXT: vpsllw $15, %xmm0, %xmm0
163 ; AVX512VL-NEXT: vpmovw2m %xmm0, %k0
164 ; AVX512VL-NEXT: kmovd %k0, %eax
165 ; AVX512VL-NEXT: xorb $0, %al
166 ; AVX512VL-NEXT: setnp %al
167 ; AVX512VL-NEXT: retq
168 %a = trunc <8 x i8> %0 to <8 x i1>
169 %b = call i1 @llvm.experimental.vector.reduce.xor.v8i1(<8 x i1> %a)
173 define i1 @trunc_v16i8_v16i1(<16 x i8>) {
174 ; SSE-LABEL: trunc_v16i8_v16i1:
176 ; SSE-NEXT: psllw $7, %xmm0
177 ; SSE-NEXT: pmovmskb %xmm0, %eax
178 ; SSE-NEXT: movl %eax, %ecx
179 ; SSE-NEXT: shrl $8, %ecx
180 ; SSE-NEXT: xorb %al, %cl
181 ; SSE-NEXT: setnp %al
184 ; AVX-LABEL: trunc_v16i8_v16i1:
186 ; AVX-NEXT: vpsllw $7, %xmm0, %xmm0
187 ; AVX-NEXT: vpmovmskb %xmm0, %eax
188 ; AVX-NEXT: movl %eax, %ecx
189 ; AVX-NEXT: shrl $8, %ecx
190 ; AVX-NEXT: xorb %al, %cl
191 ; AVX-NEXT: setnp %al
194 ; AVX512-LABEL: trunc_v16i8_v16i1:
196 ; AVX512-NEXT: vpsllw $7, %xmm0, %xmm0
197 ; AVX512-NEXT: vpmovmskb %xmm0, %eax
198 ; AVX512-NEXT: movl %eax, %ecx
199 ; AVX512-NEXT: shrl $8, %ecx
200 ; AVX512-NEXT: xorb %al, %cl
201 ; AVX512-NEXT: setnp %al
203 %a = trunc <16 x i8> %0 to <16 x i1>
204 %b = call i1 @llvm.experimental.vector.reduce.xor.v16i1(<16 x i1> %a)
208 define i1 @trunc_v4i64_v4i1(<4 x i64>) {
209 ; SSE-LABEL: trunc_v4i64_v4i1:
211 ; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2],xmm1[0,2]
212 ; SSE-NEXT: pslld $31, %xmm0
213 ; SSE-NEXT: movmskps %xmm0, %eax
214 ; SSE-NEXT: xorb $0, %al
215 ; SSE-NEXT: setnp %al
218 ; AVX-LABEL: trunc_v4i64_v4i1:
220 ; AVX-NEXT: vextractf128 $1, %ymm0, %xmm1
221 ; AVX-NEXT: vshufps {{.*#+}} xmm0 = xmm0[0,2],xmm1[0,2]
222 ; AVX-NEXT: vpslld $31, %xmm0, %xmm0
223 ; AVX-NEXT: vmovmskps %xmm0, %eax
224 ; AVX-NEXT: xorb $0, %al
225 ; AVX-NEXT: setnp %al
226 ; AVX-NEXT: vzeroupper
229 ; AVX512F-LABEL: trunc_v4i64_v4i1:
231 ; AVX512F-NEXT: vpsllq $63, %ymm0, %ymm0
232 ; AVX512F-NEXT: vptestmq %zmm0, %zmm0, %k0
233 ; AVX512F-NEXT: kmovw %k0, %eax
234 ; AVX512F-NEXT: andl $15, %eax
235 ; AVX512F-NEXT: xorb $0, %al
236 ; AVX512F-NEXT: setnp %al
237 ; AVX512F-NEXT: vzeroupper
240 ; AVX512BW-LABEL: trunc_v4i64_v4i1:
242 ; AVX512BW-NEXT: vpsllq $63, %ymm0, %ymm0
243 ; AVX512BW-NEXT: vptestmq %zmm0, %zmm0, %k0
244 ; AVX512BW-NEXT: kmovd %k0, %eax
245 ; AVX512BW-NEXT: andl $15, %eax
246 ; AVX512BW-NEXT: xorb $0, %al
247 ; AVX512BW-NEXT: setnp %al
248 ; AVX512BW-NEXT: vzeroupper
249 ; AVX512BW-NEXT: retq
251 ; AVX512VL-LABEL: trunc_v4i64_v4i1:
253 ; AVX512VL-NEXT: vpsllq $63, %ymm0, %ymm0
254 ; AVX512VL-NEXT: vptestmq %ymm0, %ymm0, %k0
255 ; AVX512VL-NEXT: kmovd %k0, %eax
256 ; AVX512VL-NEXT: andl $15, %eax
257 ; AVX512VL-NEXT: xorb $0, %al
258 ; AVX512VL-NEXT: setnp %al
259 ; AVX512VL-NEXT: vzeroupper
260 ; AVX512VL-NEXT: retq
261 %a = trunc <4 x i64> %0 to <4 x i1>
262 %b = call i1 @llvm.experimental.vector.reduce.xor.v4i1(<4 x i1> %a)
266 define i1 @trunc_v8i32_v8i1(<8 x i32>) {
267 ; SSE2-LABEL: trunc_v8i32_v8i1:
269 ; SSE2-NEXT: pslld $16, %xmm1
270 ; SSE2-NEXT: psrad $16, %xmm1
271 ; SSE2-NEXT: pslld $16, %xmm0
272 ; SSE2-NEXT: psrad $16, %xmm0
273 ; SSE2-NEXT: packssdw %xmm1, %xmm0
274 ; SSE2-NEXT: psllw $15, %xmm0
275 ; SSE2-NEXT: packsswb %xmm0, %xmm0
276 ; SSE2-NEXT: pmovmskb %xmm0, %eax
277 ; SSE2-NEXT: xorb $0, %al
278 ; SSE2-NEXT: setnp %al
281 ; SSE41-LABEL: trunc_v8i32_v8i1:
283 ; SSE41-NEXT: movdqa {{.*#+}} xmm2 = [0,1,4,5,8,9,12,13,8,9,12,13,12,13,14,15]
284 ; SSE41-NEXT: pshufb %xmm2, %xmm1
285 ; SSE41-NEXT: pshufb %xmm2, %xmm0
286 ; SSE41-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
287 ; SSE41-NEXT: psllw $15, %xmm0
288 ; SSE41-NEXT: packsswb %xmm0, %xmm0
289 ; SSE41-NEXT: pmovmskb %xmm0, %eax
290 ; SSE41-NEXT: xorb $0, %al
291 ; SSE41-NEXT: setnp %al
294 ; AVX1-LABEL: trunc_v8i32_v8i1:
296 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
297 ; AVX1-NEXT: vmovdqa {{.*#+}} xmm2 = [0,1,4,5,8,9,12,13,8,9,12,13,12,13,14,15]
298 ; AVX1-NEXT: vpshufb %xmm2, %xmm1, %xmm1
299 ; AVX1-NEXT: vpshufb %xmm2, %xmm0, %xmm0
300 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
301 ; AVX1-NEXT: vpsllw $15, %xmm0, %xmm0
302 ; AVX1-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
303 ; AVX1-NEXT: vpmovmskb %xmm0, %eax
304 ; AVX1-NEXT: xorb $0, %al
305 ; AVX1-NEXT: setnp %al
306 ; AVX1-NEXT: vzeroupper
309 ; AVX2-LABEL: trunc_v8i32_v8i1:
311 ; AVX2-NEXT: vpshufb {{.*#+}} ymm0 = ymm0[0,1,4,5,8,9,12,13,8,9,12,13,12,13,14,15,16,17,20,21,24,25,28,29,24,25,28,29,28,29,30,31]
312 ; AVX2-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,2,2,3]
313 ; AVX2-NEXT: vpsllw $15, %xmm0, %xmm0
314 ; AVX2-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
315 ; AVX2-NEXT: vpmovmskb %xmm0, %eax
316 ; AVX2-NEXT: xorb $0, %al
317 ; AVX2-NEXT: setnp %al
318 ; AVX2-NEXT: vzeroupper
321 ; AVX512F-LABEL: trunc_v8i32_v8i1:
323 ; AVX512F-NEXT: vpslld $31, %ymm0, %ymm0
324 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
325 ; AVX512F-NEXT: kmovw %k0, %eax
326 ; AVX512F-NEXT: xorb $0, %al
327 ; AVX512F-NEXT: setnp %al
328 ; AVX512F-NEXT: vzeroupper
331 ; AVX512BW-LABEL: trunc_v8i32_v8i1:
333 ; AVX512BW-NEXT: vpslld $31, %ymm0, %ymm0
334 ; AVX512BW-NEXT: vptestmd %zmm0, %zmm0, %k0
335 ; AVX512BW-NEXT: kmovd %k0, %eax
336 ; AVX512BW-NEXT: xorb $0, %al
337 ; AVX512BW-NEXT: setnp %al
338 ; AVX512BW-NEXT: vzeroupper
339 ; AVX512BW-NEXT: retq
341 ; AVX512VL-LABEL: trunc_v8i32_v8i1:
343 ; AVX512VL-NEXT: vpslld $31, %ymm0, %ymm0
344 ; AVX512VL-NEXT: vptestmd %ymm0, %ymm0, %k0
345 ; AVX512VL-NEXT: kmovd %k0, %eax
346 ; AVX512VL-NEXT: xorb $0, %al
347 ; AVX512VL-NEXT: setnp %al
348 ; AVX512VL-NEXT: vzeroupper
349 ; AVX512VL-NEXT: retq
350 %a = trunc <8 x i32> %0 to <8 x i1>
351 %b = call i1 @llvm.experimental.vector.reduce.xor.v8i1(<8 x i1> %a)
355 define i1 @trunc_v16i16_v16i1(<16 x i16>) {
356 ; SSE2-LABEL: trunc_v16i16_v16i1:
358 ; SSE2-NEXT: movdqa {{.*#+}} xmm2 = [255,255,255,255,255,255,255,255]
359 ; SSE2-NEXT: pand %xmm2, %xmm1
360 ; SSE2-NEXT: pand %xmm2, %xmm0
361 ; SSE2-NEXT: packuswb %xmm1, %xmm0
362 ; SSE2-NEXT: psllw $7, %xmm0
363 ; SSE2-NEXT: pmovmskb %xmm0, %eax
364 ; SSE2-NEXT: movl %eax, %ecx
365 ; SSE2-NEXT: shrl $8, %ecx
366 ; SSE2-NEXT: xorb %al, %cl
367 ; SSE2-NEXT: setnp %al
370 ; SSE41-LABEL: trunc_v16i16_v16i1:
372 ; SSE41-NEXT: movdqa {{.*#+}} xmm2 = <0,2,4,6,8,10,12,14,u,u,u,u,u,u,u,u>
373 ; SSE41-NEXT: pshufb %xmm2, %xmm1
374 ; SSE41-NEXT: pshufb %xmm2, %xmm0
375 ; SSE41-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
376 ; SSE41-NEXT: psllw $7, %xmm0
377 ; SSE41-NEXT: pmovmskb %xmm0, %eax
378 ; SSE41-NEXT: movl %eax, %ecx
379 ; SSE41-NEXT: shrl $8, %ecx
380 ; SSE41-NEXT: xorb %al, %cl
381 ; SSE41-NEXT: setnp %al
384 ; AVX1-LABEL: trunc_v16i16_v16i1:
386 ; AVX1-NEXT: vandps {{.*}}(%rip), %ymm0, %ymm0
387 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
388 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
389 ; AVX1-NEXT: vpsllw $7, %xmm0, %xmm0
390 ; AVX1-NEXT: vpmovmskb %xmm0, %eax
391 ; AVX1-NEXT: movl %eax, %ecx
392 ; AVX1-NEXT: shrl $8, %ecx
393 ; AVX1-NEXT: xorb %al, %cl
394 ; AVX1-NEXT: setnp %al
395 ; AVX1-NEXT: vzeroupper
398 ; AVX2-LABEL: trunc_v16i16_v16i1:
400 ; AVX2-NEXT: vpand {{.*}}(%rip), %ymm0, %ymm0
401 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm1
402 ; AVX2-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
403 ; AVX2-NEXT: vpsllw $7, %xmm0, %xmm0
404 ; AVX2-NEXT: vpmovmskb %xmm0, %eax
405 ; AVX2-NEXT: movl %eax, %ecx
406 ; AVX2-NEXT: shrl $8, %ecx
407 ; AVX2-NEXT: xorb %al, %cl
408 ; AVX2-NEXT: setnp %al
409 ; AVX2-NEXT: vzeroupper
412 ; AVX512F-LABEL: trunc_v16i16_v16i1:
414 ; AVX512F-NEXT: vpmovsxwd %ymm0, %zmm0
415 ; AVX512F-NEXT: vpslld $31, %zmm0, %zmm0
416 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
417 ; AVX512F-NEXT: kmovw %k0, %eax
418 ; AVX512F-NEXT: movl %eax, %ecx
419 ; AVX512F-NEXT: shrl $8, %ecx
420 ; AVX512F-NEXT: xorb %al, %cl
421 ; AVX512F-NEXT: setnp %al
422 ; AVX512F-NEXT: vzeroupper
425 ; AVX512BW-LABEL: trunc_v16i16_v16i1:
427 ; AVX512BW-NEXT: vpsllw $15, %ymm0, %ymm0
428 ; AVX512BW-NEXT: vpmovw2m %zmm0, %k0
429 ; AVX512BW-NEXT: kmovd %k0, %eax
430 ; AVX512BW-NEXT: movl %eax, %ecx
431 ; AVX512BW-NEXT: shrl $8, %ecx
432 ; AVX512BW-NEXT: xorb %al, %cl
433 ; AVX512BW-NEXT: setnp %al
434 ; AVX512BW-NEXT: vzeroupper
435 ; AVX512BW-NEXT: retq
437 ; AVX512VL-LABEL: trunc_v16i16_v16i1:
439 ; AVX512VL-NEXT: vpsllw $15, %ymm0, %ymm0
440 ; AVX512VL-NEXT: vpmovw2m %ymm0, %k0
441 ; AVX512VL-NEXT: kmovd %k0, %eax
442 ; AVX512VL-NEXT: movl %eax, %ecx
443 ; AVX512VL-NEXT: shrl $8, %ecx
444 ; AVX512VL-NEXT: xorb %al, %cl
445 ; AVX512VL-NEXT: setnp %al
446 ; AVX512VL-NEXT: vzeroupper
447 ; AVX512VL-NEXT: retq
448 %a = trunc <16 x i16> %0 to <16 x i1>
449 %b = call i1 @llvm.experimental.vector.reduce.xor.v16i1(<16 x i1> %a)
453 define i1 @trunc_v32i8_v32i1(<32 x i8>) {
454 ; SSE-LABEL: trunc_v32i8_v32i1:
456 ; SSE-NEXT: pxor %xmm1, %xmm0
457 ; SSE-NEXT: psllw $7, %xmm0
458 ; SSE-NEXT: pmovmskb %xmm0, %eax
459 ; SSE-NEXT: movl %eax, %ecx
460 ; SSE-NEXT: shrl $8, %ecx
461 ; SSE-NEXT: xorb %al, %cl
462 ; SSE-NEXT: setnp %al
465 ; AVX1-LABEL: trunc_v32i8_v32i1:
467 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
468 ; AVX1-NEXT: vpxor %xmm1, %xmm0, %xmm0
469 ; AVX1-NEXT: vpsllw $7, %xmm0, %xmm0
470 ; AVX1-NEXT: vpmovmskb %xmm0, %eax
471 ; AVX1-NEXT: movl %eax, %ecx
472 ; AVX1-NEXT: shrl $8, %ecx
473 ; AVX1-NEXT: xorb %al, %cl
474 ; AVX1-NEXT: setnp %al
475 ; AVX1-NEXT: vzeroupper
478 ; AVX2-LABEL: trunc_v32i8_v32i1:
480 ; AVX2-NEXT: vpsllw $7, %ymm0, %ymm0
481 ; AVX2-NEXT: vpmovmskb %ymm0, %eax
482 ; AVX2-NEXT: movl %eax, %ecx
483 ; AVX2-NEXT: shrl $16, %ecx
484 ; AVX2-NEXT: xorl %eax, %ecx
485 ; AVX2-NEXT: movl %ecx, %eax
486 ; AVX2-NEXT: shrl $8, %eax
487 ; AVX2-NEXT: xorb %cl, %al
488 ; AVX2-NEXT: setnp %al
489 ; AVX2-NEXT: vzeroupper
492 ; AVX512F-LABEL: trunc_v32i8_v32i1:
494 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm1
495 ; AVX512F-NEXT: vpxor %xmm1, %xmm0, %xmm0
496 ; AVX512F-NEXT: vpmovsxbd %xmm0, %zmm0
497 ; AVX512F-NEXT: vpslld $31, %zmm0, %zmm0
498 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
499 ; AVX512F-NEXT: kshiftrw $8, %k0, %k1
500 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
501 ; AVX512F-NEXT: kshiftrw $4, %k0, %k1
502 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
503 ; AVX512F-NEXT: kshiftrw $2, %k0, %k1
504 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
505 ; AVX512F-NEXT: kshiftrw $1, %k0, %k1
506 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
507 ; AVX512F-NEXT: kmovw %k0, %eax
508 ; AVX512F-NEXT: # kill: def $al killed $al killed $eax
509 ; AVX512F-NEXT: vzeroupper
512 ; AVX512BW-LABEL: trunc_v32i8_v32i1:
514 ; AVX512BW-NEXT: vpsllw $7, %ymm0, %ymm0
515 ; AVX512BW-NEXT: vpmovmskb %ymm0, %eax
516 ; AVX512BW-NEXT: movl %eax, %ecx
517 ; AVX512BW-NEXT: shrl $16, %ecx
518 ; AVX512BW-NEXT: xorl %eax, %ecx
519 ; AVX512BW-NEXT: movl %ecx, %eax
520 ; AVX512BW-NEXT: shrl $8, %eax
521 ; AVX512BW-NEXT: xorb %cl, %al
522 ; AVX512BW-NEXT: setnp %al
523 ; AVX512BW-NEXT: vzeroupper
524 ; AVX512BW-NEXT: retq
526 ; AVX512VL-LABEL: trunc_v32i8_v32i1:
528 ; AVX512VL-NEXT: vpsllw $7, %ymm0, %ymm0
529 ; AVX512VL-NEXT: vpmovmskb %ymm0, %eax
530 ; AVX512VL-NEXT: movl %eax, %ecx
531 ; AVX512VL-NEXT: shrl $16, %ecx
532 ; AVX512VL-NEXT: xorl %eax, %ecx
533 ; AVX512VL-NEXT: movl %ecx, %eax
534 ; AVX512VL-NEXT: shrl $8, %eax
535 ; AVX512VL-NEXT: xorb %cl, %al
536 ; AVX512VL-NEXT: setnp %al
537 ; AVX512VL-NEXT: vzeroupper
538 ; AVX512VL-NEXT: retq
539 %a = trunc <32 x i8> %0 to <32 x i1>
540 %b = call i1 @llvm.experimental.vector.reduce.xor.v32i1(<32 x i1> %a)
544 define i1 @trunc_v8i64_v8i1(<8 x i64>) {
545 ; SSE2-LABEL: trunc_v8i64_v8i1:
547 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm1[0,2,2,3]
548 ; SSE2-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[0,2,2,3,4,5,6,7]
549 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
550 ; SSE2-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,2,2,3,4,5,6,7]
551 ; SSE2-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
552 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm3[0,2,2,3]
553 ; SSE2-NEXT: pshuflw {{.*#+}} xmm1 = xmm1[0,1,0,2,4,5,6,7]
554 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm2[0,2,2,3]
555 ; SSE2-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[0,1,0,2,4,5,6,7]
556 ; SSE2-NEXT: punpckldq {{.*#+}} xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
557 ; SSE2-NEXT: movsd {{.*#+}} xmm2 = xmm0[0],xmm2[1]
558 ; SSE2-NEXT: psllw $15, %xmm2
559 ; SSE2-NEXT: packsswb %xmm0, %xmm2
560 ; SSE2-NEXT: pmovmskb %xmm2, %eax
561 ; SSE2-NEXT: xorb $0, %al
562 ; SSE2-NEXT: setnp %al
565 ; SSE41-LABEL: trunc_v8i64_v8i1:
567 ; SSE41-NEXT: pxor %xmm4, %xmm4
568 ; SSE41-NEXT: pblendw {{.*#+}} xmm3 = xmm3[0],xmm4[1,2,3],xmm3[4],xmm4[5,6,7]
569 ; SSE41-NEXT: pblendw {{.*#+}} xmm2 = xmm2[0],xmm4[1,2,3],xmm2[4],xmm4[5,6,7]
570 ; SSE41-NEXT: packusdw %xmm3, %xmm2
571 ; SSE41-NEXT: pblendw {{.*#+}} xmm1 = xmm1[0],xmm4[1,2,3],xmm1[4],xmm4[5,6,7]
572 ; SSE41-NEXT: pblendw {{.*#+}} xmm0 = xmm0[0],xmm4[1,2,3],xmm0[4],xmm4[5,6,7]
573 ; SSE41-NEXT: packusdw %xmm1, %xmm0
574 ; SSE41-NEXT: packusdw %xmm2, %xmm0
575 ; SSE41-NEXT: psllw $15, %xmm0
576 ; SSE41-NEXT: packsswb %xmm0, %xmm0
577 ; SSE41-NEXT: pmovmskb %xmm0, %eax
578 ; SSE41-NEXT: xorb $0, %al
579 ; SSE41-NEXT: setnp %al
582 ; AVX1-LABEL: trunc_v8i64_v8i1:
584 ; AVX1-NEXT: vmovaps {{.*#+}} ymm2 = [65535,65535,65535,65535]
585 ; AVX1-NEXT: vandps %ymm2, %ymm1, %ymm1
586 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm3
587 ; AVX1-NEXT: vpackusdw %xmm3, %xmm1, %xmm1
588 ; AVX1-NEXT: vandps %ymm2, %ymm0, %ymm0
589 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
590 ; AVX1-NEXT: vpackusdw %xmm2, %xmm0, %xmm0
591 ; AVX1-NEXT: vpackusdw %xmm1, %xmm0, %xmm0
592 ; AVX1-NEXT: vpsllw $15, %xmm0, %xmm0
593 ; AVX1-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
594 ; AVX1-NEXT: vpmovmskb %xmm0, %eax
595 ; AVX1-NEXT: xorb $0, %al
596 ; AVX1-NEXT: setnp %al
597 ; AVX1-NEXT: vzeroupper
600 ; AVX2-LABEL: trunc_v8i64_v8i1:
602 ; AVX2-NEXT: vextractf128 $1, %ymm1, %xmm2
603 ; AVX2-NEXT: vshufps {{.*#+}} xmm1 = xmm1[0,2],xmm2[0,2]
604 ; AVX2-NEXT: vextractf128 $1, %ymm0, %xmm2
605 ; AVX2-NEXT: vshufps {{.*#+}} xmm0 = xmm0[0,2],xmm2[0,2]
606 ; AVX2-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
607 ; AVX2-NEXT: vpshufb {{.*#+}} ymm0 = ymm0[0,1,4,5,8,9,12,13,8,9,12,13,12,13,14,15,16,17,20,21,24,25,28,29,24,25,28,29,28,29,30,31]
608 ; AVX2-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,2,2,3]
609 ; AVX2-NEXT: vpsllw $15, %xmm0, %xmm0
610 ; AVX2-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
611 ; AVX2-NEXT: vpmovmskb %xmm0, %eax
612 ; AVX2-NEXT: xorb $0, %al
613 ; AVX2-NEXT: setnp %al
614 ; AVX2-NEXT: vzeroupper
617 ; AVX512F-LABEL: trunc_v8i64_v8i1:
619 ; AVX512F-NEXT: vpsllq $63, %zmm0, %zmm0
620 ; AVX512F-NEXT: vptestmq %zmm0, %zmm0, %k0
621 ; AVX512F-NEXT: kmovw %k0, %eax
622 ; AVX512F-NEXT: xorb $0, %al
623 ; AVX512F-NEXT: setnp %al
624 ; AVX512F-NEXT: vzeroupper
627 ; AVX512BW-LABEL: trunc_v8i64_v8i1:
629 ; AVX512BW-NEXT: vpsllq $63, %zmm0, %zmm0
630 ; AVX512BW-NEXT: vptestmq %zmm0, %zmm0, %k0
631 ; AVX512BW-NEXT: kmovd %k0, %eax
632 ; AVX512BW-NEXT: xorb $0, %al
633 ; AVX512BW-NEXT: setnp %al
634 ; AVX512BW-NEXT: vzeroupper
635 ; AVX512BW-NEXT: retq
637 ; AVX512VL-LABEL: trunc_v8i64_v8i1:
639 ; AVX512VL-NEXT: vpsllq $63, %zmm0, %zmm0
640 ; AVX512VL-NEXT: vptestmq %zmm0, %zmm0, %k0
641 ; AVX512VL-NEXT: kmovd %k0, %eax
642 ; AVX512VL-NEXT: xorb $0, %al
643 ; AVX512VL-NEXT: setnp %al
644 ; AVX512VL-NEXT: vzeroupper
645 ; AVX512VL-NEXT: retq
646 %a = trunc <8 x i64> %0 to <8 x i1>
647 %b = call i1 @llvm.experimental.vector.reduce.xor.v8i1(<8 x i1> %a)
651 define i1 @trunc_v16i32_v16i1(<16 x i32>) {
652 ; SSE2-LABEL: trunc_v16i32_v16i1:
654 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0]
655 ; SSE2-NEXT: pand %xmm4, %xmm3
656 ; SSE2-NEXT: pand %xmm4, %xmm2
657 ; SSE2-NEXT: packuswb %xmm3, %xmm2
658 ; SSE2-NEXT: pand %xmm4, %xmm1
659 ; SSE2-NEXT: pand %xmm4, %xmm0
660 ; SSE2-NEXT: packuswb %xmm1, %xmm0
661 ; SSE2-NEXT: packuswb %xmm2, %xmm0
662 ; SSE2-NEXT: psllw $7, %xmm0
663 ; SSE2-NEXT: pmovmskb %xmm0, %eax
664 ; SSE2-NEXT: movl %eax, %ecx
665 ; SSE2-NEXT: shrl $8, %ecx
666 ; SSE2-NEXT: xorb %al, %cl
667 ; SSE2-NEXT: setnp %al
670 ; SSE41-LABEL: trunc_v16i32_v16i1:
672 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = [255,0,0,0,255,0,0,0,255,0,0,0,255,0,0,0]
673 ; SSE41-NEXT: pand %xmm4, %xmm3
674 ; SSE41-NEXT: pand %xmm4, %xmm2
675 ; SSE41-NEXT: packusdw %xmm3, %xmm2
676 ; SSE41-NEXT: pand %xmm4, %xmm1
677 ; SSE41-NEXT: pand %xmm4, %xmm0
678 ; SSE41-NEXT: packusdw %xmm1, %xmm0
679 ; SSE41-NEXT: packuswb %xmm2, %xmm0
680 ; SSE41-NEXT: psllw $7, %xmm0
681 ; SSE41-NEXT: pmovmskb %xmm0, %eax
682 ; SSE41-NEXT: movl %eax, %ecx
683 ; SSE41-NEXT: shrl $8, %ecx
684 ; SSE41-NEXT: xorb %al, %cl
685 ; SSE41-NEXT: setnp %al
688 ; AVX1-LABEL: trunc_v16i32_v16i1:
690 ; AVX1-NEXT: vmovaps {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255]
691 ; AVX1-NEXT: vandps %ymm2, %ymm1, %ymm1
692 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm3
693 ; AVX1-NEXT: vpackusdw %xmm3, %xmm1, %xmm1
694 ; AVX1-NEXT: vandps %ymm2, %ymm0, %ymm0
695 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
696 ; AVX1-NEXT: vpackusdw %xmm2, %xmm0, %xmm0
697 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
698 ; AVX1-NEXT: vpsllw $7, %xmm0, %xmm0
699 ; AVX1-NEXT: vpmovmskb %xmm0, %eax
700 ; AVX1-NEXT: movl %eax, %ecx
701 ; AVX1-NEXT: shrl $8, %ecx
702 ; AVX1-NEXT: xorb %al, %cl
703 ; AVX1-NEXT: setnp %al
704 ; AVX1-NEXT: vzeroupper
707 ; AVX2-LABEL: trunc_v16i32_v16i1:
709 ; AVX2-NEXT: vmovdqa {{.*#+}} ymm2 = [0,1,4,5,8,9,12,13,8,9,12,13,12,13,14,15,16,17,20,21,24,25,28,29,24,25,28,29,28,29,30,31]
710 ; AVX2-NEXT: vpshufb %ymm2, %ymm1, %ymm1
711 ; AVX2-NEXT: vpermq {{.*#+}} ymm1 = ymm1[0,2,2,3]
712 ; AVX2-NEXT: vmovdqa {{.*#+}} xmm3 = [255,255,255,255,255,255,255,255]
713 ; AVX2-NEXT: vpand %xmm3, %xmm1, %xmm1
714 ; AVX2-NEXT: vpshufb %ymm2, %ymm0, %ymm0
715 ; AVX2-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,2,2,3]
716 ; AVX2-NEXT: vpand %xmm3, %xmm0, %xmm0
717 ; AVX2-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
718 ; AVX2-NEXT: vpsllw $7, %xmm0, %xmm0
719 ; AVX2-NEXT: vpmovmskb %xmm0, %eax
720 ; AVX2-NEXT: movl %eax, %ecx
721 ; AVX2-NEXT: shrl $8, %ecx
722 ; AVX2-NEXT: xorb %al, %cl
723 ; AVX2-NEXT: setnp %al
724 ; AVX2-NEXT: vzeroupper
727 ; AVX512F-LABEL: trunc_v16i32_v16i1:
729 ; AVX512F-NEXT: vpslld $31, %zmm0, %zmm0
730 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
731 ; AVX512F-NEXT: kmovw %k0, %eax
732 ; AVX512F-NEXT: movl %eax, %ecx
733 ; AVX512F-NEXT: shrl $8, %ecx
734 ; AVX512F-NEXT: xorb %al, %cl
735 ; AVX512F-NEXT: setnp %al
736 ; AVX512F-NEXT: vzeroupper
739 ; AVX512BW-LABEL: trunc_v16i32_v16i1:
741 ; AVX512BW-NEXT: vpslld $31, %zmm0, %zmm0
742 ; AVX512BW-NEXT: vptestmd %zmm0, %zmm0, %k0
743 ; AVX512BW-NEXT: kmovd %k0, %eax
744 ; AVX512BW-NEXT: movl %eax, %ecx
745 ; AVX512BW-NEXT: shrl $8, %ecx
746 ; AVX512BW-NEXT: xorb %al, %cl
747 ; AVX512BW-NEXT: setnp %al
748 ; AVX512BW-NEXT: vzeroupper
749 ; AVX512BW-NEXT: retq
751 ; AVX512VL-LABEL: trunc_v16i32_v16i1:
753 ; AVX512VL-NEXT: vpslld $31, %zmm0, %zmm0
754 ; AVX512VL-NEXT: vptestmd %zmm0, %zmm0, %k0
755 ; AVX512VL-NEXT: kmovd %k0, %eax
756 ; AVX512VL-NEXT: movl %eax, %ecx
757 ; AVX512VL-NEXT: shrl $8, %ecx
758 ; AVX512VL-NEXT: xorb %al, %cl
759 ; AVX512VL-NEXT: setnp %al
760 ; AVX512VL-NEXT: vzeroupper
761 ; AVX512VL-NEXT: retq
762 %a = trunc <16 x i32> %0 to <16 x i1>
763 %b = call i1 @llvm.experimental.vector.reduce.xor.v16i1(<16 x i1> %a)
767 define i1 @trunc_v32i16_v32i1(<32 x i16>) {
768 ; SSE2-LABEL: trunc_v32i16_v32i1:
770 ; SSE2-NEXT: movdqa {{.*#+}} xmm4 = [255,255,255,255,255,255,255,255]
771 ; SSE2-NEXT: pand %xmm4, %xmm3
772 ; SSE2-NEXT: pand %xmm4, %xmm2
773 ; SSE2-NEXT: packuswb %xmm3, %xmm2
774 ; SSE2-NEXT: pand %xmm4, %xmm1
775 ; SSE2-NEXT: pand %xmm4, %xmm0
776 ; SSE2-NEXT: packuswb %xmm1, %xmm0
777 ; SSE2-NEXT: pxor %xmm2, %xmm0
778 ; SSE2-NEXT: psllw $7, %xmm0
779 ; SSE2-NEXT: pmovmskb %xmm0, %eax
780 ; SSE2-NEXT: movl %eax, %ecx
781 ; SSE2-NEXT: shrl $8, %ecx
782 ; SSE2-NEXT: xorb %al, %cl
783 ; SSE2-NEXT: setnp %al
786 ; SSE41-LABEL: trunc_v32i16_v32i1:
788 ; SSE41-NEXT: movdqa {{.*#+}} xmm4 = <0,2,4,6,8,10,12,14,u,u,u,u,u,u,u,u>
789 ; SSE41-NEXT: pshufb %xmm4, %xmm3
790 ; SSE41-NEXT: pshufb %xmm4, %xmm2
791 ; SSE41-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm3[0]
792 ; SSE41-NEXT: pshufb %xmm4, %xmm1
793 ; SSE41-NEXT: pshufb %xmm4, %xmm0
794 ; SSE41-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
795 ; SSE41-NEXT: pxor %xmm2, %xmm0
796 ; SSE41-NEXT: psllw $7, %xmm0
797 ; SSE41-NEXT: pmovmskb %xmm0, %eax
798 ; SSE41-NEXT: movl %eax, %ecx
799 ; SSE41-NEXT: shrl $8, %ecx
800 ; SSE41-NEXT: xorb %al, %cl
801 ; SSE41-NEXT: setnp %al
804 ; AVX1-LABEL: trunc_v32i16_v32i1:
806 ; AVX1-NEXT: vxorps %ymm1, %ymm0, %ymm0
807 ; AVX1-NEXT: vandps {{.*}}(%rip), %ymm0, %ymm0
808 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
809 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
810 ; AVX1-NEXT: vpsllw $7, %xmm0, %xmm0
811 ; AVX1-NEXT: vpmovmskb %xmm0, %eax
812 ; AVX1-NEXT: movl %eax, %ecx
813 ; AVX1-NEXT: shrl $8, %ecx
814 ; AVX1-NEXT: xorb %al, %cl
815 ; AVX1-NEXT: setnp %al
816 ; AVX1-NEXT: vzeroupper
819 ; AVX2-LABEL: trunc_v32i16_v32i1:
821 ; AVX2-NEXT: vmovdqa {{.*#+}} ymm2 = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
822 ; AVX2-NEXT: vpand %ymm2, %ymm0, %ymm0
823 ; AVX2-NEXT: vpand %ymm2, %ymm1, %ymm1
824 ; AVX2-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm2
825 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm0
826 ; AVX2-NEXT: vpblendd {{.*#+}} ymm0 = ymm0[0,1,2,3],ymm1[4,5,6,7]
827 ; AVX2-NEXT: vpackuswb %ymm0, %ymm2, %ymm0
828 ; AVX2-NEXT: vpsllw $7, %ymm0, %ymm0
829 ; AVX2-NEXT: vpmovmskb %ymm0, %eax
830 ; AVX2-NEXT: movl %eax, %ecx
831 ; AVX2-NEXT: shrl $16, %ecx
832 ; AVX2-NEXT: xorl %eax, %ecx
833 ; AVX2-NEXT: movl %ecx, %eax
834 ; AVX2-NEXT: shrl $8, %eax
835 ; AVX2-NEXT: xorb %cl, %al
836 ; AVX2-NEXT: setnp %al
837 ; AVX2-NEXT: vzeroupper
840 ; AVX512F-LABEL: trunc_v32i16_v32i1:
842 ; AVX512F-NEXT: vpxor %ymm1, %ymm0, %ymm0
843 ; AVX512F-NEXT: vpmovsxwd %ymm0, %zmm0
844 ; AVX512F-NEXT: vpslld $31, %zmm0, %zmm0
845 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
846 ; AVX512F-NEXT: kshiftrw $8, %k0, %k1
847 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
848 ; AVX512F-NEXT: kshiftrw $4, %k0, %k1
849 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
850 ; AVX512F-NEXT: kshiftrw $2, %k0, %k1
851 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
852 ; AVX512F-NEXT: kshiftrw $1, %k0, %k1
853 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
854 ; AVX512F-NEXT: kmovw %k0, %eax
855 ; AVX512F-NEXT: # kill: def $al killed $al killed $eax
856 ; AVX512F-NEXT: vzeroupper
859 ; AVX512BW-LABEL: trunc_v32i16_v32i1:
861 ; AVX512BW-NEXT: vpsllw $15, %zmm0, %zmm0
862 ; AVX512BW-NEXT: vpmovw2m %zmm0, %k0
863 ; AVX512BW-NEXT: kmovd %k0, %eax
864 ; AVX512BW-NEXT: movl %eax, %ecx
865 ; AVX512BW-NEXT: shrl $16, %ecx
866 ; AVX512BW-NEXT: xorl %eax, %ecx
867 ; AVX512BW-NEXT: movl %ecx, %eax
868 ; AVX512BW-NEXT: shrl $8, %eax
869 ; AVX512BW-NEXT: xorb %cl, %al
870 ; AVX512BW-NEXT: setnp %al
871 ; AVX512BW-NEXT: vzeroupper
872 ; AVX512BW-NEXT: retq
874 ; AVX512VL-LABEL: trunc_v32i16_v32i1:
876 ; AVX512VL-NEXT: vpsllw $15, %zmm0, %zmm0
877 ; AVX512VL-NEXT: vpmovw2m %zmm0, %k0
878 ; AVX512VL-NEXT: kmovd %k0, %eax
879 ; AVX512VL-NEXT: movl %eax, %ecx
880 ; AVX512VL-NEXT: shrl $16, %ecx
881 ; AVX512VL-NEXT: xorl %eax, %ecx
882 ; AVX512VL-NEXT: movl %ecx, %eax
883 ; AVX512VL-NEXT: shrl $8, %eax
884 ; AVX512VL-NEXT: xorb %cl, %al
885 ; AVX512VL-NEXT: setnp %al
886 ; AVX512VL-NEXT: vzeroupper
887 ; AVX512VL-NEXT: retq
888 %a = trunc <32 x i16> %0 to <32 x i1>
889 %b = call i1 @llvm.experimental.vector.reduce.xor.v32i1(<32 x i1> %a)
893 define i1 @trunc_v64i8_v64i1(<64 x i8>) {
894 ; SSE2-LABEL: trunc_v64i8_v64i1:
896 ; SSE2-NEXT: pxor %xmm3, %xmm1
897 ; SSE2-NEXT: pxor %xmm2, %xmm1
898 ; SSE2-NEXT: pxor %xmm0, %xmm1
899 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[2,3,0,1]
900 ; SSE2-NEXT: pxor %xmm1, %xmm0
901 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,2,3]
902 ; SSE2-NEXT: pxor %xmm0, %xmm1
903 ; SSE2-NEXT: movdqa %xmm1, %xmm0
904 ; SSE2-NEXT: psrld $16, %xmm0
905 ; SSE2-NEXT: pxor %xmm1, %xmm0
906 ; SSE2-NEXT: movdqa %xmm0, %xmm1
907 ; SSE2-NEXT: psrlw $8, %xmm1
908 ; SSE2-NEXT: pxor %xmm0, %xmm1
909 ; SSE2-NEXT: movd %xmm1, %eax
910 ; SSE2-NEXT: # kill: def $al killed $al killed $eax
913 ; SSE41-LABEL: trunc_v64i8_v64i1:
915 ; SSE41-NEXT: pxor %xmm3, %xmm1
916 ; SSE41-NEXT: pxor %xmm2, %xmm1
917 ; SSE41-NEXT: pxor %xmm0, %xmm1
918 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm1[2,3,0,1]
919 ; SSE41-NEXT: pxor %xmm1, %xmm0
920 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,2,3]
921 ; SSE41-NEXT: pxor %xmm0, %xmm1
922 ; SSE41-NEXT: movdqa %xmm1, %xmm0
923 ; SSE41-NEXT: psrld $16, %xmm0
924 ; SSE41-NEXT: pxor %xmm1, %xmm0
925 ; SSE41-NEXT: movdqa %xmm0, %xmm1
926 ; SSE41-NEXT: psrlw $8, %xmm1
927 ; SSE41-NEXT: pxor %xmm0, %xmm1
928 ; SSE41-NEXT: pextrb $0, %xmm1, %eax
929 ; SSE41-NEXT: # kill: def $al killed $al killed $eax
932 ; AVX1-LABEL: trunc_v64i8_v64i1:
934 ; AVX1-NEXT: vxorps %ymm1, %ymm0, %ymm0
935 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
936 ; AVX1-NEXT: vxorps %xmm1, %xmm0, %xmm0
937 ; AVX1-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[2,3,0,1]
938 ; AVX1-NEXT: vxorps %xmm1, %xmm0, %xmm0
939 ; AVX1-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[1,1,2,3]
940 ; AVX1-NEXT: vxorps %xmm1, %xmm0, %xmm0
941 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm1
942 ; AVX1-NEXT: vpxor %xmm1, %xmm0, %xmm0
943 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm1
944 ; AVX1-NEXT: vpxor %xmm1, %xmm0, %xmm0
945 ; AVX1-NEXT: vpextrb $0, %xmm0, %eax
946 ; AVX1-NEXT: # kill: def $al killed $al killed $eax
947 ; AVX1-NEXT: vzeroupper
950 ; AVX2-LABEL: trunc_v64i8_v64i1:
952 ; AVX2-NEXT: vpxor %ymm1, %ymm0, %ymm0
953 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm1
954 ; AVX2-NEXT: vpxor %xmm1, %xmm0, %xmm0
955 ; AVX2-NEXT: vpshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
956 ; AVX2-NEXT: vpxor %xmm1, %xmm0, %xmm0
957 ; AVX2-NEXT: vpshufd {{.*#+}} xmm1 = xmm0[1,1,2,3]
958 ; AVX2-NEXT: vpxor %xmm1, %xmm0, %xmm0
959 ; AVX2-NEXT: vpsrld $16, %xmm0, %xmm1
960 ; AVX2-NEXT: vpxor %xmm1, %xmm0, %xmm0
961 ; AVX2-NEXT: vpsrlw $8, %xmm0, %xmm1
962 ; AVX2-NEXT: vpxor %xmm1, %xmm0, %xmm0
963 ; AVX2-NEXT: vpextrb $0, %xmm0, %eax
964 ; AVX2-NEXT: # kill: def $al killed $al killed $eax
965 ; AVX2-NEXT: vzeroupper
968 ; AVX512F-LABEL: trunc_v64i8_v64i1:
970 ; AVX512F-NEXT: vextracti128 $1, %ymm1, %xmm2
971 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm3
972 ; AVX512F-NEXT: vpxor %xmm2, %xmm3, %xmm2
973 ; AVX512F-NEXT: vpxor %xmm2, %xmm1, %xmm1
974 ; AVX512F-NEXT: vpxor %xmm1, %xmm0, %xmm0
975 ; AVX512F-NEXT: vpmovsxbd %xmm0, %zmm0
976 ; AVX512F-NEXT: vpslld $31, %zmm0, %zmm0
977 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
978 ; AVX512F-NEXT: kshiftrw $8, %k0, %k1
979 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
980 ; AVX512F-NEXT: kshiftrw $4, %k0, %k1
981 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
982 ; AVX512F-NEXT: kshiftrw $2, %k0, %k1
983 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
984 ; AVX512F-NEXT: kshiftrw $1, %k0, %k1
985 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
986 ; AVX512F-NEXT: kmovw %k0, %eax
987 ; AVX512F-NEXT: # kill: def $al killed $al killed $eax
988 ; AVX512F-NEXT: vzeroupper
991 ; AVX512BW-LABEL: trunc_v64i8_v64i1:
993 ; AVX512BW-NEXT: vpsllw $7, %zmm0, %zmm0
994 ; AVX512BW-NEXT: vpmovb2m %zmm0, %k0
995 ; AVX512BW-NEXT: kshiftrq $32, %k0, %k1
996 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
997 ; AVX512BW-NEXT: kshiftrq $16, %k0, %k1
998 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
999 ; AVX512BW-NEXT: kshiftrq $8, %k0, %k1
1000 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
1001 ; AVX512BW-NEXT: kshiftrq $4, %k0, %k1
1002 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
1003 ; AVX512BW-NEXT: kshiftrq $2, %k0, %k1
1004 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
1005 ; AVX512BW-NEXT: kshiftrq $1, %k0, %k1
1006 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
1007 ; AVX512BW-NEXT: kmovd %k0, %eax
1008 ; AVX512BW-NEXT: # kill: def $al killed $al killed $eax
1009 ; AVX512BW-NEXT: vzeroupper
1010 ; AVX512BW-NEXT: retq
1012 ; AVX512VL-LABEL: trunc_v64i8_v64i1:
1013 ; AVX512VL: # %bb.0:
1014 ; AVX512VL-NEXT: vpsllw $7, %zmm0, %zmm0
1015 ; AVX512VL-NEXT: vpmovb2m %zmm0, %k0
1016 ; AVX512VL-NEXT: kshiftrq $32, %k0, %k1
1017 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
1018 ; AVX512VL-NEXT: kshiftrq $16, %k0, %k1
1019 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
1020 ; AVX512VL-NEXT: kshiftrq $8, %k0, %k1
1021 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
1022 ; AVX512VL-NEXT: kshiftrq $4, %k0, %k1
1023 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
1024 ; AVX512VL-NEXT: kshiftrq $2, %k0, %k1
1025 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
1026 ; AVX512VL-NEXT: kshiftrq $1, %k0, %k1
1027 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
1028 ; AVX512VL-NEXT: kmovd %k0, %eax
1029 ; AVX512VL-NEXT: # kill: def $al killed $al killed $eax
1030 ; AVX512VL-NEXT: vzeroupper
1031 ; AVX512VL-NEXT: retq
1032 %a = trunc <64 x i8> %0 to <64 x i1>
1033 %b = call i1 @llvm.experimental.vector.reduce.xor.v64i1(<64 x i1> %a)
1041 define i1 @icmp_v2i64_v2i1(<2 x i64>) {
1042 ; SSE2-LABEL: icmp_v2i64_v2i1:
1044 ; SSE2-NEXT: pxor %xmm1, %xmm1
1045 ; SSE2-NEXT: pcmpeqd %xmm0, %xmm1
1046 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[1,0,3,2]
1047 ; SSE2-NEXT: pand %xmm1, %xmm0
1048 ; SSE2-NEXT: movmskpd %xmm0, %eax
1049 ; SSE2-NEXT: xorb $0, %al
1050 ; SSE2-NEXT: setnp %al
1053 ; SSE41-LABEL: icmp_v2i64_v2i1:
1055 ; SSE41-NEXT: pxor %xmm1, %xmm1
1056 ; SSE41-NEXT: pcmpeqq %xmm0, %xmm1
1057 ; SSE41-NEXT: movmskpd %xmm1, %eax
1058 ; SSE41-NEXT: xorb $0, %al
1059 ; SSE41-NEXT: setnp %al
1062 ; AVX-LABEL: icmp_v2i64_v2i1:
1064 ; AVX-NEXT: vpxor %xmm1, %xmm1, %xmm1
1065 ; AVX-NEXT: vpcmpeqq %xmm1, %xmm0, %xmm0
1066 ; AVX-NEXT: vmovmskpd %xmm0, %eax
1067 ; AVX-NEXT: xorb $0, %al
1068 ; AVX-NEXT: setnp %al
1071 ; AVX512F-LABEL: icmp_v2i64_v2i1:
1073 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1074 ; AVX512F-NEXT: vptestnmq %zmm0, %zmm0, %k0
1075 ; AVX512F-NEXT: kmovw %k0, %eax
1076 ; AVX512F-NEXT: andl $3, %eax
1077 ; AVX512F-NEXT: xorb $0, %al
1078 ; AVX512F-NEXT: setnp %al
1079 ; AVX512F-NEXT: vzeroupper
1080 ; AVX512F-NEXT: retq
1082 ; AVX512BW-LABEL: icmp_v2i64_v2i1:
1083 ; AVX512BW: # %bb.0:
1084 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1085 ; AVX512BW-NEXT: vptestnmq %zmm0, %zmm0, %k0
1086 ; AVX512BW-NEXT: kmovd %k0, %eax
1087 ; AVX512BW-NEXT: andl $3, %eax
1088 ; AVX512BW-NEXT: xorb $0, %al
1089 ; AVX512BW-NEXT: setnp %al
1090 ; AVX512BW-NEXT: vzeroupper
1091 ; AVX512BW-NEXT: retq
1093 ; AVX512VL-LABEL: icmp_v2i64_v2i1:
1094 ; AVX512VL: # %bb.0:
1095 ; AVX512VL-NEXT: vptestnmq %xmm0, %xmm0, %k0
1096 ; AVX512VL-NEXT: kmovd %k0, %eax
1097 ; AVX512VL-NEXT: andl $3, %eax
1098 ; AVX512VL-NEXT: xorb $0, %al
1099 ; AVX512VL-NEXT: setnp %al
1100 ; AVX512VL-NEXT: retq
1101 %a = icmp eq <2 x i64> %0, zeroinitializer
1102 %b = call i1 @llvm.experimental.vector.reduce.xor.v2i1(<2 x i1> %a)
1106 define i1 @icmp_v4i32_v4i1(<4 x i32>) {
1107 ; SSE-LABEL: icmp_v4i32_v4i1:
1109 ; SSE-NEXT: pxor %xmm1, %xmm1
1110 ; SSE-NEXT: pcmpeqd %xmm0, %xmm1
1111 ; SSE-NEXT: movmskps %xmm1, %eax
1112 ; SSE-NEXT: xorb $0, %al
1113 ; SSE-NEXT: setnp %al
1116 ; AVX-LABEL: icmp_v4i32_v4i1:
1118 ; AVX-NEXT: vpxor %xmm1, %xmm1, %xmm1
1119 ; AVX-NEXT: vpcmpeqd %xmm1, %xmm0, %xmm0
1120 ; AVX-NEXT: vmovmskps %xmm0, %eax
1121 ; AVX-NEXT: xorb $0, %al
1122 ; AVX-NEXT: setnp %al
1125 ; AVX512F-LABEL: icmp_v4i32_v4i1:
1127 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1128 ; AVX512F-NEXT: vptestnmd %zmm0, %zmm0, %k0
1129 ; AVX512F-NEXT: kmovw %k0, %eax
1130 ; AVX512F-NEXT: andl $15, %eax
1131 ; AVX512F-NEXT: xorb $0, %al
1132 ; AVX512F-NEXT: setnp %al
1133 ; AVX512F-NEXT: vzeroupper
1134 ; AVX512F-NEXT: retq
1136 ; AVX512BW-LABEL: icmp_v4i32_v4i1:
1137 ; AVX512BW: # %bb.0:
1138 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1139 ; AVX512BW-NEXT: vptestnmd %zmm0, %zmm0, %k0
1140 ; AVX512BW-NEXT: kmovd %k0, %eax
1141 ; AVX512BW-NEXT: andl $15, %eax
1142 ; AVX512BW-NEXT: xorb $0, %al
1143 ; AVX512BW-NEXT: setnp %al
1144 ; AVX512BW-NEXT: vzeroupper
1145 ; AVX512BW-NEXT: retq
1147 ; AVX512VL-LABEL: icmp_v4i32_v4i1:
1148 ; AVX512VL: # %bb.0:
1149 ; AVX512VL-NEXT: vptestnmd %xmm0, %xmm0, %k0
1150 ; AVX512VL-NEXT: kmovd %k0, %eax
1151 ; AVX512VL-NEXT: andl $15, %eax
1152 ; AVX512VL-NEXT: xorb $0, %al
1153 ; AVX512VL-NEXT: setnp %al
1154 ; AVX512VL-NEXT: retq
1155 %a = icmp eq <4 x i32> %0, zeroinitializer
1156 %b = call i1 @llvm.experimental.vector.reduce.xor.v4i1(<4 x i1> %a)
1160 define i1 @icmp_v8i16_v8i1(<8 x i8>) {
1161 ; SSE-LABEL: icmp_v8i16_v8i1:
1163 ; SSE-NEXT: pand {{.*}}(%rip), %xmm0
1164 ; SSE-NEXT: pxor %xmm1, %xmm1
1165 ; SSE-NEXT: pcmpeqw %xmm0, %xmm1
1166 ; SSE-NEXT: packsswb %xmm0, %xmm1
1167 ; SSE-NEXT: pmovmskb %xmm1, %eax
1168 ; SSE-NEXT: xorb $0, %al
1169 ; SSE-NEXT: setnp %al
1172 ; AVX-LABEL: icmp_v8i16_v8i1:
1174 ; AVX-NEXT: vpand {{.*}}(%rip), %xmm0, %xmm0
1175 ; AVX-NEXT: vpxor %xmm1, %xmm1, %xmm1
1176 ; AVX-NEXT: vpcmpeqw %xmm1, %xmm0, %xmm0
1177 ; AVX-NEXT: vpacksswb %xmm0, %xmm0, %xmm0
1178 ; AVX-NEXT: vpmovmskb %xmm0, %eax
1179 ; AVX-NEXT: xorb $0, %al
1180 ; AVX-NEXT: setnp %al
1183 ; AVX512F-LABEL: icmp_v8i16_v8i1:
1185 ; AVX512F-NEXT: vpand {{.*}}(%rip), %xmm0, %xmm0
1186 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
1187 ; AVX512F-NEXT: vpcmpeqw %xmm1, %xmm0, %xmm0
1188 ; AVX512F-NEXT: vpmovsxwq %xmm0, %zmm0
1189 ; AVX512F-NEXT: vptestmq %zmm0, %zmm0, %k0
1190 ; AVX512F-NEXT: kmovw %k0, %eax
1191 ; AVX512F-NEXT: xorb $0, %al
1192 ; AVX512F-NEXT: setnp %al
1193 ; AVX512F-NEXT: vzeroupper
1194 ; AVX512F-NEXT: retq
1196 ; AVX512BW-LABEL: icmp_v8i16_v8i1:
1197 ; AVX512BW: # %bb.0:
1198 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1199 ; AVX512BW-NEXT: vmovdqa {{.*#+}} xmm1 = [255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0]
1200 ; AVX512BW-NEXT: vptestnmw %zmm1, %zmm0, %k0
1201 ; AVX512BW-NEXT: kmovd %k0, %eax
1202 ; AVX512BW-NEXT: xorb $0, %al
1203 ; AVX512BW-NEXT: setnp %al
1204 ; AVX512BW-NEXT: vzeroupper
1205 ; AVX512BW-NEXT: retq
1207 ; AVX512VL-LABEL: icmp_v8i16_v8i1:
1208 ; AVX512VL: # %bb.0:
1209 ; AVX512VL-NEXT: vptestnmw {{.*}}(%rip), %xmm0, %k0
1210 ; AVX512VL-NEXT: kmovd %k0, %eax
1211 ; AVX512VL-NEXT: xorb $0, %al
1212 ; AVX512VL-NEXT: setnp %al
1213 ; AVX512VL-NEXT: retq
1214 %a = icmp eq <8 x i8> %0, zeroinitializer
1215 %b = call i1 @llvm.experimental.vector.reduce.xor.v8i1(<8 x i1> %a)
1219 define i1 @icmp_v16i8_v16i1(<16 x i8>) {
1220 ; SSE-LABEL: icmp_v16i8_v16i1:
1222 ; SSE-NEXT: pxor %xmm1, %xmm1
1223 ; SSE-NEXT: pcmpeqb %xmm0, %xmm1
1224 ; SSE-NEXT: pmovmskb %xmm1, %eax
1225 ; SSE-NEXT: movl %eax, %ecx
1226 ; SSE-NEXT: shrl $8, %ecx
1227 ; SSE-NEXT: xorb %al, %cl
1228 ; SSE-NEXT: setnp %al
1231 ; AVX-LABEL: icmp_v16i8_v16i1:
1233 ; AVX-NEXT: vpxor %xmm1, %xmm1, %xmm1
1234 ; AVX-NEXT: vpcmpeqb %xmm1, %xmm0, %xmm0
1235 ; AVX-NEXT: vpmovmskb %xmm0, %eax
1236 ; AVX-NEXT: movl %eax, %ecx
1237 ; AVX-NEXT: shrl $8, %ecx
1238 ; AVX-NEXT: xorb %al, %cl
1239 ; AVX-NEXT: setnp %al
1242 ; AVX512F-LABEL: icmp_v16i8_v16i1:
1244 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
1245 ; AVX512F-NEXT: vpcmpeqb %xmm1, %xmm0, %xmm0
1246 ; AVX512F-NEXT: vpmovmskb %xmm0, %eax
1247 ; AVX512F-NEXT: movl %eax, %ecx
1248 ; AVX512F-NEXT: shrl $8, %ecx
1249 ; AVX512F-NEXT: xorb %al, %cl
1250 ; AVX512F-NEXT: setnp %al
1251 ; AVX512F-NEXT: retq
1253 ; AVX512BW-LABEL: icmp_v16i8_v16i1:
1254 ; AVX512BW: # %bb.0:
1255 ; AVX512BW-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1256 ; AVX512BW-NEXT: vptestnmb %zmm0, %zmm0, %k0
1257 ; AVX512BW-NEXT: kmovd %k0, %eax
1258 ; AVX512BW-NEXT: movl %eax, %ecx
1259 ; AVX512BW-NEXT: shrl $8, %ecx
1260 ; AVX512BW-NEXT: xorb %al, %cl
1261 ; AVX512BW-NEXT: setnp %al
1262 ; AVX512BW-NEXT: vzeroupper
1263 ; AVX512BW-NEXT: retq
1265 ; AVX512VL-LABEL: icmp_v16i8_v16i1:
1266 ; AVX512VL: # %bb.0:
1267 ; AVX512VL-NEXT: vptestnmb %xmm0, %xmm0, %k0
1268 ; AVX512VL-NEXT: kmovd %k0, %eax
1269 ; AVX512VL-NEXT: movl %eax, %ecx
1270 ; AVX512VL-NEXT: shrl $8, %ecx
1271 ; AVX512VL-NEXT: xorb %al, %cl
1272 ; AVX512VL-NEXT: setnp %al
1273 ; AVX512VL-NEXT: retq
1274 %a = icmp eq <16 x i8> %0, zeroinitializer
1275 %b = call i1 @llvm.experimental.vector.reduce.xor.v16i1(<16 x i1> %a)
1279 define i1 @icmp_v4i64_v4i1(<4 x i64>) {
1280 ; SSE2-LABEL: icmp_v4i64_v4i1:
1282 ; SSE2-NEXT: pxor %xmm2, %xmm2
1283 ; SSE2-NEXT: pcmpeqd %xmm2, %xmm1
1284 ; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm1[1,0,3,2]
1285 ; SSE2-NEXT: pand %xmm1, %xmm3
1286 ; SSE2-NEXT: pcmpeqd %xmm2, %xmm0
1287 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,0,3,2]
1288 ; SSE2-NEXT: pand %xmm0, %xmm1
1289 ; SSE2-NEXT: packssdw %xmm3, %xmm1
1290 ; SSE2-NEXT: movmskps %xmm1, %eax
1291 ; SSE2-NEXT: xorb $0, %al
1292 ; SSE2-NEXT: setnp %al
1295 ; SSE41-LABEL: icmp_v4i64_v4i1:
1297 ; SSE41-NEXT: pxor %xmm2, %xmm2
1298 ; SSE41-NEXT: pcmpeqq %xmm2, %xmm1
1299 ; SSE41-NEXT: pcmpeqq %xmm2, %xmm0
1300 ; SSE41-NEXT: packssdw %xmm1, %xmm0
1301 ; SSE41-NEXT: movmskps %xmm0, %eax
1302 ; SSE41-NEXT: xorb $0, %al
1303 ; SSE41-NEXT: setnp %al
1306 ; AVX1-LABEL: icmp_v4i64_v4i1:
1308 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
1309 ; AVX1-NEXT: vpxor %xmm2, %xmm2, %xmm2
1310 ; AVX1-NEXT: vpcmpeqq %xmm2, %xmm1, %xmm1
1311 ; AVX1-NEXT: vpcmpeqq %xmm2, %xmm0, %xmm0
1312 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1313 ; AVX1-NEXT: vmovmskpd %ymm0, %eax
1314 ; AVX1-NEXT: xorb $0, %al
1315 ; AVX1-NEXT: setnp %al
1316 ; AVX1-NEXT: vzeroupper
1319 ; AVX2-LABEL: icmp_v4i64_v4i1:
1321 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
1322 ; AVX2-NEXT: vpcmpeqq %ymm1, %ymm0, %ymm0
1323 ; AVX2-NEXT: vmovmskpd %ymm0, %eax
1324 ; AVX2-NEXT: xorb $0, %al
1325 ; AVX2-NEXT: setnp %al
1326 ; AVX2-NEXT: vzeroupper
1329 ; AVX512F-LABEL: icmp_v4i64_v4i1:
1331 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1332 ; AVX512F-NEXT: vptestnmq %zmm0, %zmm0, %k0
1333 ; AVX512F-NEXT: kmovw %k0, %eax
1334 ; AVX512F-NEXT: andl $15, %eax
1335 ; AVX512F-NEXT: xorb $0, %al
1336 ; AVX512F-NEXT: setnp %al
1337 ; AVX512F-NEXT: vzeroupper
1338 ; AVX512F-NEXT: retq
1340 ; AVX512BW-LABEL: icmp_v4i64_v4i1:
1341 ; AVX512BW: # %bb.0:
1342 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1343 ; AVX512BW-NEXT: vptestnmq %zmm0, %zmm0, %k0
1344 ; AVX512BW-NEXT: kmovd %k0, %eax
1345 ; AVX512BW-NEXT: andl $15, %eax
1346 ; AVX512BW-NEXT: xorb $0, %al
1347 ; AVX512BW-NEXT: setnp %al
1348 ; AVX512BW-NEXT: vzeroupper
1349 ; AVX512BW-NEXT: retq
1351 ; AVX512VL-LABEL: icmp_v4i64_v4i1:
1352 ; AVX512VL: # %bb.0:
1353 ; AVX512VL-NEXT: vptestnmq %ymm0, %ymm0, %k0
1354 ; AVX512VL-NEXT: kmovd %k0, %eax
1355 ; AVX512VL-NEXT: andl $15, %eax
1356 ; AVX512VL-NEXT: xorb $0, %al
1357 ; AVX512VL-NEXT: setnp %al
1358 ; AVX512VL-NEXT: vzeroupper
1359 ; AVX512VL-NEXT: retq
1360 %a = icmp eq <4 x i64> %0, zeroinitializer
1361 %b = call i1 @llvm.experimental.vector.reduce.xor.v4i1(<4 x i1> %a)
1365 define i1 @icmp_v8i32_v8i1(<8 x i32>) {
1366 ; SSE-LABEL: icmp_v8i32_v8i1:
1368 ; SSE-NEXT: pxor %xmm2, %xmm2
1369 ; SSE-NEXT: pcmpeqd %xmm2, %xmm1
1370 ; SSE-NEXT: pcmpeqd %xmm2, %xmm0
1371 ; SSE-NEXT: packssdw %xmm1, %xmm0
1372 ; SSE-NEXT: packsswb %xmm0, %xmm0
1373 ; SSE-NEXT: pmovmskb %xmm0, %eax
1374 ; SSE-NEXT: xorb $0, %al
1375 ; SSE-NEXT: setnp %al
1378 ; AVX1-LABEL: icmp_v8i32_v8i1:
1380 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
1381 ; AVX1-NEXT: vpxor %xmm2, %xmm2, %xmm2
1382 ; AVX1-NEXT: vpcmpeqd %xmm2, %xmm1, %xmm1
1383 ; AVX1-NEXT: vpcmpeqd %xmm2, %xmm0, %xmm0
1384 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1385 ; AVX1-NEXT: vmovmskps %ymm0, %eax
1386 ; AVX1-NEXT: xorb $0, %al
1387 ; AVX1-NEXT: setnp %al
1388 ; AVX1-NEXT: vzeroupper
1391 ; AVX2-LABEL: icmp_v8i32_v8i1:
1393 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
1394 ; AVX2-NEXT: vpcmpeqd %ymm1, %ymm0, %ymm0
1395 ; AVX2-NEXT: vmovmskps %ymm0, %eax
1396 ; AVX2-NEXT: xorb $0, %al
1397 ; AVX2-NEXT: setnp %al
1398 ; AVX2-NEXT: vzeroupper
1401 ; AVX512F-LABEL: icmp_v8i32_v8i1:
1403 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1404 ; AVX512F-NEXT: vptestnmd %zmm0, %zmm0, %k0
1405 ; AVX512F-NEXT: kmovw %k0, %eax
1406 ; AVX512F-NEXT: xorb $0, %al
1407 ; AVX512F-NEXT: setnp %al
1408 ; AVX512F-NEXT: vzeroupper
1409 ; AVX512F-NEXT: retq
1411 ; AVX512BW-LABEL: icmp_v8i32_v8i1:
1412 ; AVX512BW: # %bb.0:
1413 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1414 ; AVX512BW-NEXT: vptestnmd %zmm0, %zmm0, %k0
1415 ; AVX512BW-NEXT: kmovd %k0, %eax
1416 ; AVX512BW-NEXT: xorb $0, %al
1417 ; AVX512BW-NEXT: setnp %al
1418 ; AVX512BW-NEXT: vzeroupper
1419 ; AVX512BW-NEXT: retq
1421 ; AVX512VL-LABEL: icmp_v8i32_v8i1:
1422 ; AVX512VL: # %bb.0:
1423 ; AVX512VL-NEXT: vptestnmd %ymm0, %ymm0, %k0
1424 ; AVX512VL-NEXT: kmovd %k0, %eax
1425 ; AVX512VL-NEXT: xorb $0, %al
1426 ; AVX512VL-NEXT: setnp %al
1427 ; AVX512VL-NEXT: vzeroupper
1428 ; AVX512VL-NEXT: retq
1429 %a = icmp eq <8 x i32> %0, zeroinitializer
1430 %b = call i1 @llvm.experimental.vector.reduce.xor.v8i1(<8 x i1> %a)
1434 define i1 @icmp_v16i16_v16i1(<16 x i16>) {
1435 ; SSE-LABEL: icmp_v16i16_v16i1:
1437 ; SSE-NEXT: pxor %xmm2, %xmm2
1438 ; SSE-NEXT: pcmpeqw %xmm2, %xmm1
1439 ; SSE-NEXT: pcmpeqw %xmm2, %xmm0
1440 ; SSE-NEXT: packsswb %xmm1, %xmm0
1441 ; SSE-NEXT: pmovmskb %xmm0, %eax
1442 ; SSE-NEXT: movl %eax, %ecx
1443 ; SSE-NEXT: shrl $8, %ecx
1444 ; SSE-NEXT: xorb %al, %cl
1445 ; SSE-NEXT: setnp %al
1448 ; AVX1-LABEL: icmp_v16i16_v16i1:
1450 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
1451 ; AVX1-NEXT: vpxor %xmm2, %xmm2, %xmm2
1452 ; AVX1-NEXT: vpcmpeqw %xmm2, %xmm1, %xmm1
1453 ; AVX1-NEXT: vpcmpeqw %xmm2, %xmm0, %xmm0
1454 ; AVX1-NEXT: vpacksswb %xmm1, %xmm0, %xmm0
1455 ; AVX1-NEXT: vpmovmskb %xmm0, %eax
1456 ; AVX1-NEXT: movl %eax, %ecx
1457 ; AVX1-NEXT: shrl $8, %ecx
1458 ; AVX1-NEXT: xorb %al, %cl
1459 ; AVX1-NEXT: setnp %al
1460 ; AVX1-NEXT: vzeroupper
1463 ; AVX2-LABEL: icmp_v16i16_v16i1:
1465 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
1466 ; AVX2-NEXT: vpcmpeqw %ymm1, %ymm0, %ymm0
1467 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm1
1468 ; AVX2-NEXT: vpacksswb %xmm1, %xmm0, %xmm0
1469 ; AVX2-NEXT: vpmovmskb %xmm0, %eax
1470 ; AVX2-NEXT: movl %eax, %ecx
1471 ; AVX2-NEXT: shrl $8, %ecx
1472 ; AVX2-NEXT: xorb %al, %cl
1473 ; AVX2-NEXT: setnp %al
1474 ; AVX2-NEXT: vzeroupper
1477 ; AVX512F-LABEL: icmp_v16i16_v16i1:
1479 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
1480 ; AVX512F-NEXT: vpcmpeqw %ymm1, %ymm0, %ymm0
1481 ; AVX512F-NEXT: vpmovsxwd %ymm0, %zmm0
1482 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
1483 ; AVX512F-NEXT: kmovw %k0, %eax
1484 ; AVX512F-NEXT: movl %eax, %ecx
1485 ; AVX512F-NEXT: shrl $8, %ecx
1486 ; AVX512F-NEXT: xorb %al, %cl
1487 ; AVX512F-NEXT: setnp %al
1488 ; AVX512F-NEXT: vzeroupper
1489 ; AVX512F-NEXT: retq
1491 ; AVX512BW-LABEL: icmp_v16i16_v16i1:
1492 ; AVX512BW: # %bb.0:
1493 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1494 ; AVX512BW-NEXT: vptestnmw %zmm0, %zmm0, %k0
1495 ; AVX512BW-NEXT: kmovd %k0, %eax
1496 ; AVX512BW-NEXT: movl %eax, %ecx
1497 ; AVX512BW-NEXT: shrl $8, %ecx
1498 ; AVX512BW-NEXT: xorb %al, %cl
1499 ; AVX512BW-NEXT: setnp %al
1500 ; AVX512BW-NEXT: vzeroupper
1501 ; AVX512BW-NEXT: retq
1503 ; AVX512VL-LABEL: icmp_v16i16_v16i1:
1504 ; AVX512VL: # %bb.0:
1505 ; AVX512VL-NEXT: vptestnmw %ymm0, %ymm0, %k0
1506 ; AVX512VL-NEXT: kmovd %k0, %eax
1507 ; AVX512VL-NEXT: movl %eax, %ecx
1508 ; AVX512VL-NEXT: shrl $8, %ecx
1509 ; AVX512VL-NEXT: xorb %al, %cl
1510 ; AVX512VL-NEXT: setnp %al
1511 ; AVX512VL-NEXT: vzeroupper
1512 ; AVX512VL-NEXT: retq
1513 %a = icmp eq <16 x i16> %0, zeroinitializer
1514 %b = call i1 @llvm.experimental.vector.reduce.xor.v16i1(<16 x i1> %a)
1518 define i1 @icmp_v32i8_v32i1(<32 x i8>) {
1519 ; SSE-LABEL: icmp_v32i8_v32i1:
1521 ; SSE-NEXT: pxor %xmm2, %xmm2
1522 ; SSE-NEXT: pcmpeqb %xmm2, %xmm1
1523 ; SSE-NEXT: pcmpeqb %xmm2, %xmm0
1524 ; SSE-NEXT: pxor %xmm1, %xmm0
1525 ; SSE-NEXT: pmovmskb %xmm0, %eax
1526 ; SSE-NEXT: movl %eax, %ecx
1527 ; SSE-NEXT: shrl $8, %ecx
1528 ; SSE-NEXT: xorb %al, %cl
1529 ; SSE-NEXT: setnp %al
1532 ; AVX1-LABEL: icmp_v32i8_v32i1:
1534 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
1535 ; AVX1-NEXT: vpxor %xmm2, %xmm2, %xmm2
1536 ; AVX1-NEXT: vpcmpeqb %xmm2, %xmm1, %xmm1
1537 ; AVX1-NEXT: vpcmpeqb %xmm2, %xmm0, %xmm0
1538 ; AVX1-NEXT: vpxor %xmm1, %xmm0, %xmm0
1539 ; AVX1-NEXT: vpmovmskb %xmm0, %eax
1540 ; AVX1-NEXT: movl %eax, %ecx
1541 ; AVX1-NEXT: shrl $8, %ecx
1542 ; AVX1-NEXT: xorb %al, %cl
1543 ; AVX1-NEXT: setnp %al
1544 ; AVX1-NEXT: vzeroupper
1547 ; AVX2-LABEL: icmp_v32i8_v32i1:
1549 ; AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
1550 ; AVX2-NEXT: vpcmpeqb %ymm1, %ymm0, %ymm0
1551 ; AVX2-NEXT: vpmovmskb %ymm0, %eax
1552 ; AVX2-NEXT: movl %eax, %ecx
1553 ; AVX2-NEXT: shrl $16, %ecx
1554 ; AVX2-NEXT: xorl %eax, %ecx
1555 ; AVX2-NEXT: movl %ecx, %eax
1556 ; AVX2-NEXT: shrl $8, %eax
1557 ; AVX2-NEXT: xorb %cl, %al
1558 ; AVX2-NEXT: setnp %al
1559 ; AVX2-NEXT: vzeroupper
1562 ; AVX512F-LABEL: icmp_v32i8_v32i1:
1564 ; AVX512F-NEXT: vpxor %xmm1, %xmm1, %xmm1
1565 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm0, %ymm0
1566 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm1
1567 ; AVX512F-NEXT: vpxor %xmm1, %xmm0, %xmm0
1568 ; AVX512F-NEXT: vpmovsxbd %xmm0, %zmm0
1569 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
1570 ; AVX512F-NEXT: kshiftrw $8, %k0, %k1
1571 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
1572 ; AVX512F-NEXT: kshiftrw $4, %k0, %k1
1573 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
1574 ; AVX512F-NEXT: kshiftrw $2, %k0, %k1
1575 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
1576 ; AVX512F-NEXT: kshiftrw $1, %k0, %k1
1577 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
1578 ; AVX512F-NEXT: kmovw %k0, %eax
1579 ; AVX512F-NEXT: # kill: def $al killed $al killed $eax
1580 ; AVX512F-NEXT: vzeroupper
1581 ; AVX512F-NEXT: retq
1583 ; AVX512BW-LABEL: icmp_v32i8_v32i1:
1584 ; AVX512BW: # %bb.0:
1585 ; AVX512BW-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1586 ; AVX512BW-NEXT: vptestnmb %zmm0, %zmm0, %k0
1587 ; AVX512BW-NEXT: kmovd %k0, %eax
1588 ; AVX512BW-NEXT: movl %eax, %ecx
1589 ; AVX512BW-NEXT: shrl $16, %ecx
1590 ; AVX512BW-NEXT: xorl %eax, %ecx
1591 ; AVX512BW-NEXT: movl %ecx, %eax
1592 ; AVX512BW-NEXT: shrl $8, %eax
1593 ; AVX512BW-NEXT: xorb %cl, %al
1594 ; AVX512BW-NEXT: setnp %al
1595 ; AVX512BW-NEXT: vzeroupper
1596 ; AVX512BW-NEXT: retq
1598 ; AVX512VL-LABEL: icmp_v32i8_v32i1:
1599 ; AVX512VL: # %bb.0:
1600 ; AVX512VL-NEXT: vptestnmb %ymm0, %ymm0, %k0
1601 ; AVX512VL-NEXT: kmovd %k0, %eax
1602 ; AVX512VL-NEXT: movl %eax, %ecx
1603 ; AVX512VL-NEXT: shrl $16, %ecx
1604 ; AVX512VL-NEXT: xorl %eax, %ecx
1605 ; AVX512VL-NEXT: movl %ecx, %eax
1606 ; AVX512VL-NEXT: shrl $8, %eax
1607 ; AVX512VL-NEXT: xorb %cl, %al
1608 ; AVX512VL-NEXT: setnp %al
1609 ; AVX512VL-NEXT: vzeroupper
1610 ; AVX512VL-NEXT: retq
1611 %a = icmp eq <32 x i8> %0, zeroinitializer
1612 %b = call i1 @llvm.experimental.vector.reduce.xor.v32i1(<32 x i1> %a)
1616 define i1 @icmp_v8i64_v8i1(<8 x i64>) {
1617 ; SSE2-LABEL: icmp_v8i64_v8i1:
1619 ; SSE2-NEXT: pxor %xmm4, %xmm4
1620 ; SSE2-NEXT: pcmpeqd %xmm4, %xmm3
1621 ; SSE2-NEXT: pshufd {{.*#+}} xmm5 = xmm3[1,0,3,2]
1622 ; SSE2-NEXT: pand %xmm3, %xmm5
1623 ; SSE2-NEXT: pcmpeqd %xmm4, %xmm2
1624 ; SSE2-NEXT: pshufd {{.*#+}} xmm3 = xmm2[1,0,3,2]
1625 ; SSE2-NEXT: pand %xmm2, %xmm3
1626 ; SSE2-NEXT: packssdw %xmm5, %xmm3
1627 ; SSE2-NEXT: pcmpeqd %xmm4, %xmm1
1628 ; SSE2-NEXT: pshufd {{.*#+}} xmm2 = xmm1[1,0,3,2]
1629 ; SSE2-NEXT: pand %xmm1, %xmm2
1630 ; SSE2-NEXT: pcmpeqd %xmm4, %xmm0
1631 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,0,3,2]
1632 ; SSE2-NEXT: pand %xmm0, %xmm1
1633 ; SSE2-NEXT: packssdw %xmm2, %xmm1
1634 ; SSE2-NEXT: packssdw %xmm3, %xmm1
1635 ; SSE2-NEXT: packsswb %xmm0, %xmm1
1636 ; SSE2-NEXT: pmovmskb %xmm1, %eax
1637 ; SSE2-NEXT: xorb $0, %al
1638 ; SSE2-NEXT: setnp %al
1641 ; SSE41-LABEL: icmp_v8i64_v8i1:
1643 ; SSE41-NEXT: pxor %xmm4, %xmm4
1644 ; SSE41-NEXT: pcmpeqq %xmm4, %xmm3
1645 ; SSE41-NEXT: pcmpeqq %xmm4, %xmm2
1646 ; SSE41-NEXT: packssdw %xmm3, %xmm2
1647 ; SSE41-NEXT: pcmpeqq %xmm4, %xmm1
1648 ; SSE41-NEXT: pcmpeqq %xmm4, %xmm0
1649 ; SSE41-NEXT: packssdw %xmm1, %xmm0
1650 ; SSE41-NEXT: packssdw %xmm2, %xmm0
1651 ; SSE41-NEXT: packsswb %xmm0, %xmm0
1652 ; SSE41-NEXT: pmovmskb %xmm0, %eax
1653 ; SSE41-NEXT: xorb $0, %al
1654 ; SSE41-NEXT: setnp %al
1657 ; AVX1-LABEL: icmp_v8i64_v8i1:
1659 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm2
1660 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
1661 ; AVX1-NEXT: vpcmpeqq %xmm3, %xmm2, %xmm2
1662 ; AVX1-NEXT: vpcmpeqq %xmm3, %xmm1, %xmm1
1663 ; AVX1-NEXT: vpackssdw %xmm2, %xmm1, %xmm1
1664 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
1665 ; AVX1-NEXT: vpcmpeqq %xmm3, %xmm2, %xmm2
1666 ; AVX1-NEXT: vpcmpeqq %xmm3, %xmm0, %xmm0
1667 ; AVX1-NEXT: vpackssdw %xmm2, %xmm0, %xmm0
1668 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1669 ; AVX1-NEXT: vmovmskps %ymm0, %eax
1670 ; AVX1-NEXT: xorb $0, %al
1671 ; AVX1-NEXT: setnp %al
1672 ; AVX1-NEXT: vzeroupper
1675 ; AVX2-LABEL: icmp_v8i64_v8i1:
1677 ; AVX2-NEXT: vpxor %xmm2, %xmm2, %xmm2
1678 ; AVX2-NEXT: vpcmpeqq %ymm2, %ymm1, %ymm1
1679 ; AVX2-NEXT: vpcmpeqq %ymm2, %ymm0, %ymm0
1680 ; AVX2-NEXT: vpackssdw %ymm1, %ymm0, %ymm0
1681 ; AVX2-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,2,1,3]
1682 ; AVX2-NEXT: vmovmskps %ymm0, %eax
1683 ; AVX2-NEXT: xorb $0, %al
1684 ; AVX2-NEXT: setnp %al
1685 ; AVX2-NEXT: vzeroupper
1688 ; AVX512F-LABEL: icmp_v8i64_v8i1:
1690 ; AVX512F-NEXT: vptestnmq %zmm0, %zmm0, %k0
1691 ; AVX512F-NEXT: kmovw %k0, %eax
1692 ; AVX512F-NEXT: xorb $0, %al
1693 ; AVX512F-NEXT: setnp %al
1694 ; AVX512F-NEXT: vzeroupper
1695 ; AVX512F-NEXT: retq
1697 ; AVX512BW-LABEL: icmp_v8i64_v8i1:
1698 ; AVX512BW: # %bb.0:
1699 ; AVX512BW-NEXT: vptestnmq %zmm0, %zmm0, %k0
1700 ; AVX512BW-NEXT: kmovd %k0, %eax
1701 ; AVX512BW-NEXT: xorb $0, %al
1702 ; AVX512BW-NEXT: setnp %al
1703 ; AVX512BW-NEXT: vzeroupper
1704 ; AVX512BW-NEXT: retq
1706 ; AVX512VL-LABEL: icmp_v8i64_v8i1:
1707 ; AVX512VL: # %bb.0:
1708 ; AVX512VL-NEXT: vptestnmq %zmm0, %zmm0, %k0
1709 ; AVX512VL-NEXT: kmovd %k0, %eax
1710 ; AVX512VL-NEXT: xorb $0, %al
1711 ; AVX512VL-NEXT: setnp %al
1712 ; AVX512VL-NEXT: vzeroupper
1713 ; AVX512VL-NEXT: retq
1714 %a = icmp eq <8 x i64> %0, zeroinitializer
1715 %b = call i1 @llvm.experimental.vector.reduce.xor.v8i1(<8 x i1> %a)
1719 define i1 @icmp_v16i32_v16i1(<16 x i32>) {
1720 ; SSE-LABEL: icmp_v16i32_v16i1:
1722 ; SSE-NEXT: pxor %xmm4, %xmm4
1723 ; SSE-NEXT: pcmpeqd %xmm4, %xmm3
1724 ; SSE-NEXT: pcmpeqd %xmm4, %xmm2
1725 ; SSE-NEXT: packssdw %xmm3, %xmm2
1726 ; SSE-NEXT: pcmpeqd %xmm4, %xmm1
1727 ; SSE-NEXT: pcmpeqd %xmm4, %xmm0
1728 ; SSE-NEXT: packssdw %xmm1, %xmm0
1729 ; SSE-NEXT: packsswb %xmm2, %xmm0
1730 ; SSE-NEXT: pmovmskb %xmm0, %eax
1731 ; SSE-NEXT: movl %eax, %ecx
1732 ; SSE-NEXT: shrl $8, %ecx
1733 ; SSE-NEXT: xorb %al, %cl
1734 ; SSE-NEXT: setnp %al
1737 ; AVX1-LABEL: icmp_v16i32_v16i1:
1739 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm2
1740 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
1741 ; AVX1-NEXT: vpcmpeqd %xmm3, %xmm2, %xmm2
1742 ; AVX1-NEXT: vpcmpeqd %xmm3, %xmm1, %xmm1
1743 ; AVX1-NEXT: vpackssdw %xmm2, %xmm1, %xmm1
1744 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
1745 ; AVX1-NEXT: vpcmpeqd %xmm3, %xmm2, %xmm2
1746 ; AVX1-NEXT: vpcmpeqd %xmm3, %xmm0, %xmm0
1747 ; AVX1-NEXT: vpackssdw %xmm2, %xmm0, %xmm0
1748 ; AVX1-NEXT: vpacksswb %xmm1, %xmm0, %xmm0
1749 ; AVX1-NEXT: vpmovmskb %xmm0, %eax
1750 ; AVX1-NEXT: movl %eax, %ecx
1751 ; AVX1-NEXT: shrl $8, %ecx
1752 ; AVX1-NEXT: xorb %al, %cl
1753 ; AVX1-NEXT: setnp %al
1754 ; AVX1-NEXT: vzeroupper
1757 ; AVX2-LABEL: icmp_v16i32_v16i1:
1759 ; AVX2-NEXT: vpxor %xmm2, %xmm2, %xmm2
1760 ; AVX2-NEXT: vpcmpeqd %ymm2, %ymm1, %ymm1
1761 ; AVX2-NEXT: vpcmpeqd %ymm2, %ymm0, %ymm0
1762 ; AVX2-NEXT: vpackssdw %ymm1, %ymm0, %ymm0
1763 ; AVX2-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,2,1,3]
1764 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm1
1765 ; AVX2-NEXT: vpacksswb %xmm1, %xmm0, %xmm0
1766 ; AVX2-NEXT: vpmovmskb %xmm0, %eax
1767 ; AVX2-NEXT: movl %eax, %ecx
1768 ; AVX2-NEXT: shrl $8, %ecx
1769 ; AVX2-NEXT: xorb %al, %cl
1770 ; AVX2-NEXT: setnp %al
1771 ; AVX2-NEXT: vzeroupper
1774 ; AVX512F-LABEL: icmp_v16i32_v16i1:
1776 ; AVX512F-NEXT: vptestnmd %zmm0, %zmm0, %k0
1777 ; AVX512F-NEXT: kmovw %k0, %eax
1778 ; AVX512F-NEXT: movl %eax, %ecx
1779 ; AVX512F-NEXT: shrl $8, %ecx
1780 ; AVX512F-NEXT: xorb %al, %cl
1781 ; AVX512F-NEXT: setnp %al
1782 ; AVX512F-NEXT: vzeroupper
1783 ; AVX512F-NEXT: retq
1785 ; AVX512BW-LABEL: icmp_v16i32_v16i1:
1786 ; AVX512BW: # %bb.0:
1787 ; AVX512BW-NEXT: vptestnmd %zmm0, %zmm0, %k0
1788 ; AVX512BW-NEXT: kmovd %k0, %eax
1789 ; AVX512BW-NEXT: movl %eax, %ecx
1790 ; AVX512BW-NEXT: shrl $8, %ecx
1791 ; AVX512BW-NEXT: xorb %al, %cl
1792 ; AVX512BW-NEXT: setnp %al
1793 ; AVX512BW-NEXT: vzeroupper
1794 ; AVX512BW-NEXT: retq
1796 ; AVX512VL-LABEL: icmp_v16i32_v16i1:
1797 ; AVX512VL: # %bb.0:
1798 ; AVX512VL-NEXT: vptestnmd %zmm0, %zmm0, %k0
1799 ; AVX512VL-NEXT: kmovd %k0, %eax
1800 ; AVX512VL-NEXT: movl %eax, %ecx
1801 ; AVX512VL-NEXT: shrl $8, %ecx
1802 ; AVX512VL-NEXT: xorb %al, %cl
1803 ; AVX512VL-NEXT: setnp %al
1804 ; AVX512VL-NEXT: vzeroupper
1805 ; AVX512VL-NEXT: retq
1806 %a = icmp eq <16 x i32> %0, zeroinitializer
1807 %b = call i1 @llvm.experimental.vector.reduce.xor.v16i1(<16 x i1> %a)
1811 define i1 @icmp_v32i16_v32i1(<32 x i16>) {
1812 ; SSE-LABEL: icmp_v32i16_v32i1:
1814 ; SSE-NEXT: pxor %xmm4, %xmm4
1815 ; SSE-NEXT: pcmpeqw %xmm4, %xmm1
1816 ; SSE-NEXT: pcmpeqw %xmm4, %xmm0
1817 ; SSE-NEXT: packsswb %xmm1, %xmm0
1818 ; SSE-NEXT: pcmpeqw %xmm4, %xmm3
1819 ; SSE-NEXT: pcmpeqw %xmm4, %xmm2
1820 ; SSE-NEXT: packsswb %xmm3, %xmm2
1821 ; SSE-NEXT: pxor %xmm0, %xmm2
1822 ; SSE-NEXT: pmovmskb %xmm2, %eax
1823 ; SSE-NEXT: movl %eax, %ecx
1824 ; SSE-NEXT: shrl $8, %ecx
1825 ; SSE-NEXT: xorb %al, %cl
1826 ; SSE-NEXT: setnp %al
1829 ; AVX1-LABEL: icmp_v32i16_v32i1:
1831 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm2
1832 ; AVX1-NEXT: vpxor %xmm3, %xmm3, %xmm3
1833 ; AVX1-NEXT: vpcmpeqw %xmm3, %xmm2, %xmm2
1834 ; AVX1-NEXT: vpcmpeqw %xmm3, %xmm1, %xmm1
1835 ; AVX1-NEXT: vpacksswb %xmm2, %xmm1, %xmm1
1836 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
1837 ; AVX1-NEXT: vpcmpeqw %xmm3, %xmm2, %xmm2
1838 ; AVX1-NEXT: vpcmpeqw %xmm3, %xmm0, %xmm0
1839 ; AVX1-NEXT: vpacksswb %xmm2, %xmm0, %xmm0
1840 ; AVX1-NEXT: vpxor %xmm1, %xmm0, %xmm0
1841 ; AVX1-NEXT: vpsllw $7, %xmm0, %xmm0
1842 ; AVX1-NEXT: vpmovmskb %xmm0, %eax
1843 ; AVX1-NEXT: movl %eax, %ecx
1844 ; AVX1-NEXT: shrl $8, %ecx
1845 ; AVX1-NEXT: xorb %al, %cl
1846 ; AVX1-NEXT: setnp %al
1847 ; AVX1-NEXT: vzeroupper
1850 ; AVX2-LABEL: icmp_v32i16_v32i1:
1852 ; AVX2-NEXT: vpxor %xmm2, %xmm2, %xmm2
1853 ; AVX2-NEXT: vpcmpeqw %ymm2, %ymm1, %ymm1
1854 ; AVX2-NEXT: vpcmpeqw %ymm2, %ymm0, %ymm0
1855 ; AVX2-NEXT: vpacksswb %ymm1, %ymm0, %ymm0
1856 ; AVX2-NEXT: vpermq {{.*#+}} ymm0 = ymm0[0,2,1,3]
1857 ; AVX2-NEXT: vpmovmskb %ymm0, %eax
1858 ; AVX2-NEXT: movl %eax, %ecx
1859 ; AVX2-NEXT: shrl $16, %ecx
1860 ; AVX2-NEXT: xorl %eax, %ecx
1861 ; AVX2-NEXT: movl %ecx, %eax
1862 ; AVX2-NEXT: shrl $8, %eax
1863 ; AVX2-NEXT: xorb %cl, %al
1864 ; AVX2-NEXT: setnp %al
1865 ; AVX2-NEXT: vzeroupper
1868 ; AVX512F-LABEL: icmp_v32i16_v32i1:
1870 ; AVX512F-NEXT: vpxor %xmm2, %xmm2, %xmm2
1871 ; AVX512F-NEXT: vpcmpeqw %ymm2, %ymm1, %ymm1
1872 ; AVX512F-NEXT: vpcmpeqw %ymm2, %ymm0, %ymm0
1873 ; AVX512F-NEXT: vpxor %ymm1, %ymm0, %ymm0
1874 ; AVX512F-NEXT: vpmovsxwd %ymm0, %zmm0
1875 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
1876 ; AVX512F-NEXT: kshiftrw $8, %k0, %k1
1877 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
1878 ; AVX512F-NEXT: kshiftrw $4, %k0, %k1
1879 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
1880 ; AVX512F-NEXT: kshiftrw $2, %k0, %k1
1881 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
1882 ; AVX512F-NEXT: kshiftrw $1, %k0, %k1
1883 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
1884 ; AVX512F-NEXT: kmovw %k0, %eax
1885 ; AVX512F-NEXT: # kill: def $al killed $al killed $eax
1886 ; AVX512F-NEXT: vzeroupper
1887 ; AVX512F-NEXT: retq
1889 ; AVX512BW-LABEL: icmp_v32i16_v32i1:
1890 ; AVX512BW: # %bb.0:
1891 ; AVX512BW-NEXT: vptestnmw %zmm0, %zmm0, %k0
1892 ; AVX512BW-NEXT: kmovd %k0, %eax
1893 ; AVX512BW-NEXT: movl %eax, %ecx
1894 ; AVX512BW-NEXT: shrl $16, %ecx
1895 ; AVX512BW-NEXT: xorl %eax, %ecx
1896 ; AVX512BW-NEXT: movl %ecx, %eax
1897 ; AVX512BW-NEXT: shrl $8, %eax
1898 ; AVX512BW-NEXT: xorb %cl, %al
1899 ; AVX512BW-NEXT: setnp %al
1900 ; AVX512BW-NEXT: vzeroupper
1901 ; AVX512BW-NEXT: retq
1903 ; AVX512VL-LABEL: icmp_v32i16_v32i1:
1904 ; AVX512VL: # %bb.0:
1905 ; AVX512VL-NEXT: vptestnmw %zmm0, %zmm0, %k0
1906 ; AVX512VL-NEXT: kmovd %k0, %eax
1907 ; AVX512VL-NEXT: movl %eax, %ecx
1908 ; AVX512VL-NEXT: shrl $16, %ecx
1909 ; AVX512VL-NEXT: xorl %eax, %ecx
1910 ; AVX512VL-NEXT: movl %ecx, %eax
1911 ; AVX512VL-NEXT: shrl $8, %eax
1912 ; AVX512VL-NEXT: xorb %cl, %al
1913 ; AVX512VL-NEXT: setnp %al
1914 ; AVX512VL-NEXT: vzeroupper
1915 ; AVX512VL-NEXT: retq
1916 %a = icmp eq <32 x i16> %0, zeroinitializer
1917 %b = call i1 @llvm.experimental.vector.reduce.xor.v32i1(<32 x i1> %a)
1921 define i1 @icmp_v64i8_v64i1(<64 x i8>) {
1922 ; SSE2-LABEL: icmp_v64i8_v64i1:
1924 ; SSE2-NEXT: pxor %xmm4, %xmm4
1925 ; SSE2-NEXT: pcmpeqb %xmm4, %xmm2
1926 ; SSE2-NEXT: pcmpeqb %xmm4, %xmm0
1927 ; SSE2-NEXT: pcmpeqb %xmm4, %xmm3
1928 ; SSE2-NEXT: pcmpeqb %xmm4, %xmm1
1929 ; SSE2-NEXT: pxor %xmm3, %xmm1
1930 ; SSE2-NEXT: pxor %xmm2, %xmm1
1931 ; SSE2-NEXT: pxor %xmm0, %xmm1
1932 ; SSE2-NEXT: pshufd {{.*#+}} xmm0 = xmm1[2,3,0,1]
1933 ; SSE2-NEXT: pxor %xmm1, %xmm0
1934 ; SSE2-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,2,3]
1935 ; SSE2-NEXT: pxor %xmm0, %xmm1
1936 ; SSE2-NEXT: movdqa %xmm1, %xmm0
1937 ; SSE2-NEXT: psrld $16, %xmm0
1938 ; SSE2-NEXT: pxor %xmm1, %xmm0
1939 ; SSE2-NEXT: movdqa %xmm0, %xmm1
1940 ; SSE2-NEXT: psrlw $8, %xmm1
1941 ; SSE2-NEXT: pxor %xmm0, %xmm1
1942 ; SSE2-NEXT: movd %xmm1, %eax
1943 ; SSE2-NEXT: # kill: def $al killed $al killed $eax
1946 ; SSE41-LABEL: icmp_v64i8_v64i1:
1948 ; SSE41-NEXT: pxor %xmm4, %xmm4
1949 ; SSE41-NEXT: pcmpeqb %xmm4, %xmm2
1950 ; SSE41-NEXT: pcmpeqb %xmm4, %xmm0
1951 ; SSE41-NEXT: pcmpeqb %xmm4, %xmm3
1952 ; SSE41-NEXT: pcmpeqb %xmm4, %xmm1
1953 ; SSE41-NEXT: pxor %xmm3, %xmm1
1954 ; SSE41-NEXT: pxor %xmm2, %xmm1
1955 ; SSE41-NEXT: pxor %xmm0, %xmm1
1956 ; SSE41-NEXT: pshufd {{.*#+}} xmm0 = xmm1[2,3,0,1]
1957 ; SSE41-NEXT: pxor %xmm1, %xmm0
1958 ; SSE41-NEXT: pshufd {{.*#+}} xmm1 = xmm0[1,1,2,3]
1959 ; SSE41-NEXT: pxor %xmm0, %xmm1
1960 ; SSE41-NEXT: movdqa %xmm1, %xmm0
1961 ; SSE41-NEXT: psrld $16, %xmm0
1962 ; SSE41-NEXT: pxor %xmm1, %xmm0
1963 ; SSE41-NEXT: movdqa %xmm0, %xmm1
1964 ; SSE41-NEXT: psrlw $8, %xmm1
1965 ; SSE41-NEXT: pxor %xmm0, %xmm1
1966 ; SSE41-NEXT: pextrb $0, %xmm1, %eax
1967 ; SSE41-NEXT: # kill: def $al killed $al killed $eax
1970 ; AVX1-LABEL: icmp_v64i8_v64i1:
1972 ; AVX1-NEXT: vpxor %xmm2, %xmm2, %xmm2
1973 ; AVX1-NEXT: vpcmpeqb %xmm2, %xmm1, %xmm3
1974 ; AVX1-NEXT: vpcmpeqb %xmm2, %xmm0, %xmm4
1975 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm1
1976 ; AVX1-NEXT: vpcmpeqb %xmm2, %xmm1, %xmm1
1977 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm0
1978 ; AVX1-NEXT: vpcmpeqb %xmm2, %xmm0, %xmm0
1979 ; AVX1-NEXT: vpxor %xmm1, %xmm0, %xmm0
1980 ; AVX1-NEXT: vpxor %xmm0, %xmm3, %xmm0
1981 ; AVX1-NEXT: vpxor %xmm0, %xmm4, %xmm0
1982 ; AVX1-NEXT: vpshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
1983 ; AVX1-NEXT: vpxor %xmm1, %xmm0, %xmm0
1984 ; AVX1-NEXT: vpshufd {{.*#+}} xmm1 = xmm0[1,1,2,3]
1985 ; AVX1-NEXT: vpxor %xmm1, %xmm0, %xmm0
1986 ; AVX1-NEXT: vpsrld $16, %xmm0, %xmm1
1987 ; AVX1-NEXT: vpxor %xmm1, %xmm0, %xmm0
1988 ; AVX1-NEXT: vpsrlw $8, %xmm0, %xmm1
1989 ; AVX1-NEXT: vpxor %xmm1, %xmm0, %xmm0
1990 ; AVX1-NEXT: vpextrb $0, %xmm0, %eax
1991 ; AVX1-NEXT: # kill: def $al killed $al killed $eax
1992 ; AVX1-NEXT: vzeroupper
1995 ; AVX2-LABEL: icmp_v64i8_v64i1:
1997 ; AVX2-NEXT: vpxor %xmm2, %xmm2, %xmm2
1998 ; AVX2-NEXT: vpcmpeqb %ymm2, %ymm1, %ymm1
1999 ; AVX2-NEXT: vpcmpeqb %ymm2, %ymm0, %ymm0
2000 ; AVX2-NEXT: vpxor %ymm1, %ymm0, %ymm0
2001 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm1
2002 ; AVX2-NEXT: vpxor %xmm1, %xmm0, %xmm0
2003 ; AVX2-NEXT: vpshufd {{.*#+}} xmm1 = xmm0[2,3,0,1]
2004 ; AVX2-NEXT: vpxor %xmm1, %xmm0, %xmm0
2005 ; AVX2-NEXT: vpshufd {{.*#+}} xmm1 = xmm0[1,1,2,3]
2006 ; AVX2-NEXT: vpxor %xmm1, %xmm0, %xmm0
2007 ; AVX2-NEXT: vpsrld $16, %xmm0, %xmm1
2008 ; AVX2-NEXT: vpxor %xmm1, %xmm0, %xmm0
2009 ; AVX2-NEXT: vpsrlw $8, %xmm0, %xmm1
2010 ; AVX2-NEXT: vpxor %xmm1, %xmm0, %xmm0
2011 ; AVX2-NEXT: vpextrb $0, %xmm0, %eax
2012 ; AVX2-NEXT: # kill: def $al killed $al killed $eax
2013 ; AVX2-NEXT: vzeroupper
2016 ; AVX512F-LABEL: icmp_v64i8_v64i1:
2018 ; AVX512F-NEXT: vpxor %xmm2, %xmm2, %xmm2
2019 ; AVX512F-NEXT: vpcmpeqb %ymm2, %ymm1, %ymm1
2020 ; AVX512F-NEXT: vpcmpeqb %ymm2, %ymm0, %ymm0
2021 ; AVX512F-NEXT: vextracti128 $1, %ymm1, %xmm2
2022 ; AVX512F-NEXT: vextracti128 $1, %ymm0, %xmm3
2023 ; AVX512F-NEXT: vpxor %xmm2, %xmm3, %xmm2
2024 ; AVX512F-NEXT: vpxor %xmm2, %xmm1, %xmm1
2025 ; AVX512F-NEXT: vpxor %xmm1, %xmm0, %xmm0
2026 ; AVX512F-NEXT: vpmovsxbd %xmm0, %zmm0
2027 ; AVX512F-NEXT: vptestmd %zmm0, %zmm0, %k0
2028 ; AVX512F-NEXT: kshiftrw $8, %k0, %k1
2029 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
2030 ; AVX512F-NEXT: kshiftrw $4, %k0, %k1
2031 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
2032 ; AVX512F-NEXT: kshiftrw $2, %k0, %k1
2033 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
2034 ; AVX512F-NEXT: kshiftrw $1, %k0, %k1
2035 ; AVX512F-NEXT: kxorw %k1, %k0, %k0
2036 ; AVX512F-NEXT: kmovw %k0, %eax
2037 ; AVX512F-NEXT: # kill: def $al killed $al killed $eax
2038 ; AVX512F-NEXT: vzeroupper
2039 ; AVX512F-NEXT: retq
2041 ; AVX512BW-LABEL: icmp_v64i8_v64i1:
2042 ; AVX512BW: # %bb.0:
2043 ; AVX512BW-NEXT: vptestnmb %zmm0, %zmm0, %k0
2044 ; AVX512BW-NEXT: kshiftrq $32, %k0, %k1
2045 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
2046 ; AVX512BW-NEXT: kshiftrq $16, %k0, %k1
2047 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
2048 ; AVX512BW-NEXT: kshiftrq $8, %k0, %k1
2049 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
2050 ; AVX512BW-NEXT: kshiftrq $4, %k0, %k1
2051 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
2052 ; AVX512BW-NEXT: kshiftrq $2, %k0, %k1
2053 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
2054 ; AVX512BW-NEXT: kshiftrq $1, %k0, %k1
2055 ; AVX512BW-NEXT: kxorq %k1, %k0, %k0
2056 ; AVX512BW-NEXT: kmovd %k0, %eax
2057 ; AVX512BW-NEXT: # kill: def $al killed $al killed $eax
2058 ; AVX512BW-NEXT: vzeroupper
2059 ; AVX512BW-NEXT: retq
2061 ; AVX512VL-LABEL: icmp_v64i8_v64i1:
2062 ; AVX512VL: # %bb.0:
2063 ; AVX512VL-NEXT: vptestnmb %zmm0, %zmm0, %k0
2064 ; AVX512VL-NEXT: kshiftrq $32, %k0, %k1
2065 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
2066 ; AVX512VL-NEXT: kshiftrq $16, %k0, %k1
2067 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
2068 ; AVX512VL-NEXT: kshiftrq $8, %k0, %k1
2069 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
2070 ; AVX512VL-NEXT: kshiftrq $4, %k0, %k1
2071 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
2072 ; AVX512VL-NEXT: kshiftrq $2, %k0, %k1
2073 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
2074 ; AVX512VL-NEXT: kshiftrq $1, %k0, %k1
2075 ; AVX512VL-NEXT: kxorq %k1, %k0, %k0
2076 ; AVX512VL-NEXT: kmovd %k0, %eax
2077 ; AVX512VL-NEXT: # kill: def $al killed $al killed $eax
2078 ; AVX512VL-NEXT: vzeroupper
2079 ; AVX512VL-NEXT: retq
2080 %a = icmp eq <64 x i8> %0, zeroinitializer
2081 %b = call i1 @llvm.experimental.vector.reduce.xor.v64i1(<64 x i1> %a)
2085 declare i1 @llvm.experimental.vector.reduce.xor.v2i1(<2 x i1>)
2086 declare i1 @llvm.experimental.vector.reduce.xor.v4i1(<4 x i1>)
2087 declare i1 @llvm.experimental.vector.reduce.xor.v8i1(<8 x i1>)
2088 declare i1 @llvm.experimental.vector.reduce.xor.v16i1(<16 x i1>)
2089 declare i1 @llvm.experimental.vector.reduce.xor.v32i1(<32 x i1>)
2090 declare i1 @llvm.experimental.vector.reduce.xor.v64i1(<64 x i1>)