1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefixes=CHECK,NOBMI
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+bmi | FileCheck %s --check-prefixes=CHECK,BMI
5 define zeroext i1 @all_bits_clear(i32 %P, i32 %Q) nounwind {
6 ; CHECK-LABEL: all_bits_clear:
8 ; CHECK-NEXT: orl %esi, %edi
11 %a = icmp eq i32 %P, 0
12 %b = icmp eq i32 %Q, 0
17 define zeroext i1 @all_sign_bits_clear(i32 %P, i32 %Q) nounwind {
18 ; CHECK-LABEL: all_sign_bits_clear:
20 ; CHECK-NEXT: orl %esi, %edi
21 ; CHECK-NEXT: setns %al
23 %a = icmp sgt i32 %P, -1
24 %b = icmp sgt i32 %Q, -1
29 define zeroext i1 @all_bits_set(i32 %P, i32 %Q) nounwind {
30 ; CHECK-LABEL: all_bits_set:
32 ; CHECK-NEXT: andl %esi, %edi
33 ; CHECK-NEXT: cmpl $-1, %edi
34 ; CHECK-NEXT: sete %al
36 %a = icmp eq i32 %P, -1
37 %b = icmp eq i32 %Q, -1
42 define zeroext i1 @all_sign_bits_set(i32 %P, i32 %Q) nounwind {
43 ; CHECK-LABEL: all_sign_bits_set:
45 ; CHECK-NEXT: movl %edi, %eax
46 ; CHECK-NEXT: andl %esi, %eax
47 ; CHECK-NEXT: shrl $31, %eax
48 ; CHECK-NEXT: # kill: def $al killed $al killed $eax
50 %a = icmp slt i32 %P, 0
51 %b = icmp slt i32 %Q, 0
56 define zeroext i1 @any_bits_set(i32 %P, i32 %Q) nounwind {
57 ; CHECK-LABEL: any_bits_set:
59 ; CHECK-NEXT: orl %esi, %edi
60 ; CHECK-NEXT: setne %al
62 %a = icmp ne i32 %P, 0
63 %b = icmp ne i32 %Q, 0
68 define zeroext i1 @any_sign_bits_set(i32 %P, i32 %Q) nounwind {
69 ; CHECK-LABEL: any_sign_bits_set:
71 ; CHECK-NEXT: movl %edi, %eax
72 ; CHECK-NEXT: orl %esi, %eax
73 ; CHECK-NEXT: shrl $31, %eax
74 ; CHECK-NEXT: # kill: def $al killed $al killed $eax
76 %a = icmp slt i32 %P, 0
77 %b = icmp slt i32 %Q, 0
82 define zeroext i1 @any_bits_clear(i32 %P, i32 %Q) nounwind {
83 ; CHECK-LABEL: any_bits_clear:
85 ; CHECK-NEXT: andl %esi, %edi
86 ; CHECK-NEXT: cmpl $-1, %edi
87 ; CHECK-NEXT: setne %al
89 %a = icmp ne i32 %P, -1
90 %b = icmp ne i32 %Q, -1
95 define zeroext i1 @any_sign_bits_clear(i32 %P, i32 %Q) nounwind {
96 ; CHECK-LABEL: any_sign_bits_clear:
98 ; CHECK-NEXT: testl %esi, %edi
99 ; CHECK-NEXT: setns %al
101 %a = icmp sgt i32 %P, -1
102 %b = icmp sgt i32 %Q, -1
107 ; PR3351 - (P == 0) & (Q == 0) -> (P|Q) == 0
108 define i32 @all_bits_clear_branch(i32* %P, i32* %Q) nounwind {
109 ; CHECK-LABEL: all_bits_clear_branch:
110 ; CHECK: # %bb.0: # %entry
111 ; CHECK-NEXT: orq %rsi, %rdi
112 ; CHECK-NEXT: jne .LBB8_2
113 ; CHECK-NEXT: # %bb.1: # %bb1
114 ; CHECK-NEXT: movl $4, %eax
116 ; CHECK-NEXT: .LBB8_2: # %return
117 ; CHECK-NEXT: movl $192, %eax
120 %a = icmp eq i32* %P, null
121 %b = icmp eq i32* %Q, null
123 br i1 %c, label %bb1, label %return
132 define i32 @all_sign_bits_clear_branch(i32 %P, i32 %Q) nounwind {
133 ; CHECK-LABEL: all_sign_bits_clear_branch:
134 ; CHECK: # %bb.0: # %entry
135 ; CHECK-NEXT: testl %edi, %edi
136 ; CHECK-NEXT: js .LBB9_3
137 ; CHECK-NEXT: # %bb.1: # %entry
138 ; CHECK-NEXT: testl %esi, %esi
139 ; CHECK-NEXT: js .LBB9_3
140 ; CHECK-NEXT: # %bb.2: # %bb1
141 ; CHECK-NEXT: movl $4, %eax
143 ; CHECK-NEXT: .LBB9_3: # %return
144 ; CHECK-NEXT: movl $192, %eax
147 %a = icmp sgt i32 %P, -1
148 %b = icmp sgt i32 %Q, -1
150 br i1 %c, label %bb1, label %return
159 define i32 @all_bits_set_branch(i32 %P, i32 %Q) nounwind {
160 ; CHECK-LABEL: all_bits_set_branch:
161 ; CHECK: # %bb.0: # %entry
162 ; CHECK-NEXT: cmpl $-1, %edi
163 ; CHECK-NEXT: jne .LBB10_3
164 ; CHECK-NEXT: # %bb.1: # %entry
165 ; CHECK-NEXT: cmpl $-1, %esi
166 ; CHECK-NEXT: jne .LBB10_3
167 ; CHECK-NEXT: # %bb.2: # %bb1
168 ; CHECK-NEXT: movl $4, %eax
170 ; CHECK-NEXT: .LBB10_3: # %return
171 ; CHECK-NEXT: movl $192, %eax
174 %a = icmp eq i32 %P, -1
175 %b = icmp eq i32 %Q, -1
177 br i1 %c, label %bb1, label %return
186 define i32 @all_sign_bits_set_branch(i32 %P, i32 %Q) nounwind {
187 ; CHECK-LABEL: all_sign_bits_set_branch:
188 ; CHECK: # %bb.0: # %entry
189 ; CHECK-NEXT: testl %edi, %edi
190 ; CHECK-NEXT: jns .LBB11_3
191 ; CHECK-NEXT: # %bb.1: # %entry
192 ; CHECK-NEXT: testl %esi, %esi
193 ; CHECK-NEXT: jns .LBB11_3
194 ; CHECK-NEXT: # %bb.2: # %bb1
195 ; CHECK-NEXT: movl $4, %eax
197 ; CHECK-NEXT: .LBB11_3: # %return
198 ; CHECK-NEXT: movl $192, %eax
201 %a = icmp slt i32 %P, 0
202 %b = icmp slt i32 %Q, 0
204 br i1 %c, label %bb1, label %return
213 ; PR3351 - (P != 0) | (Q != 0) -> (P|Q) != 0
214 define i32 @any_bits_set_branch(i32* %P, i32* %Q) nounwind {
215 ; CHECK-LABEL: any_bits_set_branch:
216 ; CHECK: # %bb.0: # %entry
217 ; CHECK-NEXT: orq %rsi, %rdi
218 ; CHECK-NEXT: je .LBB12_2
219 ; CHECK-NEXT: # %bb.1: # %bb1
220 ; CHECK-NEXT: movl $4, %eax
222 ; CHECK-NEXT: .LBB12_2: # %return
223 ; CHECK-NEXT: movl $192, %eax
226 %a = icmp ne i32* %P, null
227 %b = icmp ne i32* %Q, null
229 br i1 %c, label %bb1, label %return
238 define i32 @any_sign_bits_set_branch(i32 %P, i32 %Q) nounwind {
239 ; CHECK-LABEL: any_sign_bits_set_branch:
240 ; CHECK: # %bb.0: # %entry
241 ; CHECK-NEXT: testl %edi, %edi
242 ; CHECK-NEXT: js .LBB13_2
243 ; CHECK-NEXT: # %bb.1: # %entry
244 ; CHECK-NEXT: testl %esi, %esi
245 ; CHECK-NEXT: js .LBB13_2
246 ; CHECK-NEXT: # %bb.3: # %return
247 ; CHECK-NEXT: movl $192, %eax
249 ; CHECK-NEXT: .LBB13_2: # %bb1
250 ; CHECK-NEXT: movl $4, %eax
253 %a = icmp slt i32 %P, 0
254 %b = icmp slt i32 %Q, 0
256 br i1 %c, label %bb1, label %return
265 define i32 @any_bits_clear_branch(i32 %P, i32 %Q) nounwind {
266 ; CHECK-LABEL: any_bits_clear_branch:
267 ; CHECK: # %bb.0: # %entry
268 ; CHECK-NEXT: cmpl $-1, %edi
269 ; CHECK-NEXT: jne .LBB14_2
270 ; CHECK-NEXT: # %bb.1: # %entry
271 ; CHECK-NEXT: cmpl $-1, %esi
272 ; CHECK-NEXT: jne .LBB14_2
273 ; CHECK-NEXT: # %bb.3: # %return
274 ; CHECK-NEXT: movl $192, %eax
276 ; CHECK-NEXT: .LBB14_2: # %bb1
277 ; CHECK-NEXT: movl $4, %eax
280 %a = icmp ne i32 %P, -1
281 %b = icmp ne i32 %Q, -1
283 br i1 %c, label %bb1, label %return
292 define i32 @any_sign_bits_clear_branch(i32 %P, i32 %Q) nounwind {
293 ; CHECK-LABEL: any_sign_bits_clear_branch:
294 ; CHECK: # %bb.0: # %entry
295 ; CHECK-NEXT: testl %edi, %edi
296 ; CHECK-NEXT: jns .LBB15_2
297 ; CHECK-NEXT: # %bb.1: # %entry
298 ; CHECK-NEXT: testl %esi, %esi
299 ; CHECK-NEXT: jns .LBB15_2
300 ; CHECK-NEXT: # %bb.3: # %return
301 ; CHECK-NEXT: movl $192, %eax
303 ; CHECK-NEXT: .LBB15_2: # %bb1
304 ; CHECK-NEXT: movl $4, %eax
307 %a = icmp sgt i32 %P, -1
308 %b = icmp sgt i32 %Q, -1
310 br i1 %c, label %bb1, label %return
319 ; PR44565 - https://bugs.llvm.org/show_bug.cgi?id=44565
321 define i32 @vec_extract_branch(<2 x double> %x) {
322 ; CHECK-LABEL: vec_extract_branch:
324 ; CHECK-NEXT: xorpd %xmm1, %xmm1
325 ; CHECK-NEXT: cmpltpd %xmm0, %xmm1
326 ; CHECK-NEXT: movmskpd %xmm1, %eax
327 ; CHECK-NEXT: cmpb $3, %al
328 ; CHECK-NEXT: jne .LBB16_2
329 ; CHECK-NEXT: # %bb.1: # %true
330 ; CHECK-NEXT: movl $42, %eax
332 ; CHECK-NEXT: .LBB16_2: # %false
333 ; CHECK-NEXT: movl $88, %eax
335 %t1 = fcmp ogt <2 x double> %x, zeroinitializer
336 %t2 = extractelement <2 x i1> %t1, i32 0
337 %t3 = extractelement <2 x i1> %t1, i32 1
338 %t4 = and i1 %t2, %t3
339 br i1 %t4, label %true, label %false
346 define <4 x i1> @all_bits_clear_vec(<4 x i32> %P, <4 x i32> %Q) nounwind {
347 ; CHECK-LABEL: all_bits_clear_vec:
349 ; CHECK-NEXT: por %xmm1, %xmm0
350 ; CHECK-NEXT: pxor %xmm1, %xmm1
351 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
353 %a = icmp eq <4 x i32> %P, zeroinitializer
354 %b = icmp eq <4 x i32> %Q, zeroinitializer
355 %c = and <4 x i1> %a, %b
359 define <4 x i1> @all_sign_bits_clear_vec(<4 x i32> %P, <4 x i32> %Q) nounwind {
360 ; CHECK-LABEL: all_sign_bits_clear_vec:
362 ; CHECK-NEXT: por %xmm1, %xmm0
363 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm1
364 ; CHECK-NEXT: pcmpgtd %xmm1, %xmm0
366 %a = icmp sgt <4 x i32> %P, <i32 -1, i32 -1, i32 -1, i32 -1>
367 %b = icmp sgt <4 x i32> %Q, <i32 -1, i32 -1, i32 -1, i32 -1>
368 %c = and <4 x i1> %a, %b
372 define <4 x i1> @all_bits_set_vec(<4 x i32> %P, <4 x i32> %Q) nounwind {
373 ; CHECK-LABEL: all_bits_set_vec:
375 ; CHECK-NEXT: pand %xmm1, %xmm0
376 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm1
377 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
379 %a = icmp eq <4 x i32> %P, <i32 -1, i32 -1, i32 -1, i32 -1>
380 %b = icmp eq <4 x i32> %Q, <i32 -1, i32 -1, i32 -1, i32 -1>
381 %c = and <4 x i1> %a, %b
385 define <4 x i1> @all_sign_bits_set_vec(<4 x i32> %P, <4 x i32> %Q) nounwind {
386 ; CHECK-LABEL: all_sign_bits_set_vec:
388 ; CHECK-NEXT: pand %xmm1, %xmm0
389 ; CHECK-NEXT: pxor %xmm1, %xmm1
390 ; CHECK-NEXT: pcmpgtd %xmm0, %xmm1
391 ; CHECK-NEXT: movdqa %xmm1, %xmm0
393 %a = icmp slt <4 x i32> %P, zeroinitializer
394 %b = icmp slt <4 x i32> %Q, zeroinitializer
395 %c = and <4 x i1> %a, %b
399 define <4 x i1> @any_bits_set_vec(<4 x i32> %P, <4 x i32> %Q) nounwind {
400 ; CHECK-LABEL: any_bits_set_vec:
402 ; CHECK-NEXT: por %xmm1, %xmm0
403 ; CHECK-NEXT: pxor %xmm1, %xmm1
404 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
405 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm1
406 ; CHECK-NEXT: pxor %xmm1, %xmm0
408 %a = icmp ne <4 x i32> %P, zeroinitializer
409 %b = icmp ne <4 x i32> %Q, zeroinitializer
410 %c = or <4 x i1> %a, %b
414 define <4 x i1> @any_sign_bits_set_vec(<4 x i32> %P, <4 x i32> %Q) nounwind {
415 ; CHECK-LABEL: any_sign_bits_set_vec:
417 ; CHECK-NEXT: por %xmm1, %xmm0
418 ; CHECK-NEXT: pxor %xmm1, %xmm1
419 ; CHECK-NEXT: pcmpgtd %xmm0, %xmm1
420 ; CHECK-NEXT: movdqa %xmm1, %xmm0
422 %a = icmp slt <4 x i32> %P, zeroinitializer
423 %b = icmp slt <4 x i32> %Q, zeroinitializer
424 %c = or <4 x i1> %a, %b
428 define <4 x i1> @any_bits_clear_vec(<4 x i32> %P, <4 x i32> %Q) nounwind {
429 ; CHECK-LABEL: any_bits_clear_vec:
431 ; CHECK-NEXT: pand %xmm1, %xmm0
432 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm1
433 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
434 ; CHECK-NEXT: pxor %xmm1, %xmm0
436 %a = icmp ne <4 x i32> %P, <i32 -1, i32 -1, i32 -1, i32 -1>
437 %b = icmp ne <4 x i32> %Q, <i32 -1, i32 -1, i32 -1, i32 -1>
438 %c = or <4 x i1> %a, %b
442 define <4 x i1> @any_sign_bits_clear_vec(<4 x i32> %P, <4 x i32> %Q) nounwind {
443 ; CHECK-LABEL: any_sign_bits_clear_vec:
445 ; CHECK-NEXT: pand %xmm1, %xmm0
446 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm1
447 ; CHECK-NEXT: pcmpgtd %xmm1, %xmm0
449 %a = icmp sgt <4 x i32> %P, <i32 -1, i32 -1, i32 -1, i32 -1>
450 %b = icmp sgt <4 x i32> %Q, <i32 -1, i32 -1, i32 -1, i32 -1>
451 %c = or <4 x i1> %a, %b
455 define zeroext i1 @ne_neg1_and_ne_zero(i64 %x) nounwind {
456 ; CHECK-LABEL: ne_neg1_and_ne_zero:
458 ; CHECK-NEXT: incq %rdi
459 ; CHECK-NEXT: cmpq $2, %rdi
460 ; CHECK-NEXT: setae %al
462 %cmp1 = icmp ne i64 %x, -1
463 %cmp2 = icmp ne i64 %x, 0
464 %and = and i1 %cmp1, %cmp2
468 ; PR32401 - https://bugs.llvm.org/show_bug.cgi?id=32401
470 define zeroext i1 @and_eq(i8 %a, i8 %b, i8 %c, i8 %d) nounwind {
471 ; CHECK-LABEL: and_eq:
473 ; CHECK-NEXT: xorl %esi, %edi
474 ; CHECK-NEXT: xorl %ecx, %edx
475 ; CHECK-NEXT: orb %dl, %dil
476 ; CHECK-NEXT: sete %al
478 %cmp1 = icmp eq i8 %a, %b
479 %cmp2 = icmp eq i8 %c, %d
480 %and = and i1 %cmp1, %cmp2
484 define zeroext i1 @or_ne(i8 %a, i8 %b, i8 %c, i8 %d) nounwind {
485 ; CHECK-LABEL: or_ne:
487 ; CHECK-NEXT: xorl %esi, %edi
488 ; CHECK-NEXT: xorl %ecx, %edx
489 ; CHECK-NEXT: orb %dl, %dil
490 ; CHECK-NEXT: setne %al
492 %cmp1 = icmp ne i8 %a, %b
493 %cmp2 = icmp ne i8 %c, %d
494 %or = or i1 %cmp1, %cmp2
498 ; This should not be transformed because vector compares + bitwise logic are faster.
500 define <4 x i1> @and_eq_vec(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i32> %d) nounwind {
501 ; CHECK-LABEL: and_eq_vec:
503 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
504 ; CHECK-NEXT: pcmpeqd %xmm3, %xmm2
505 ; CHECK-NEXT: pand %xmm2, %xmm0
507 %cmp1 = icmp eq <4 x i32> %a, %b
508 %cmp2 = icmp eq <4 x i32> %c, %d
509 %and = and <4 x i1> %cmp1, %cmp2
513 define i1 @or_icmps_const_1bit_diff(i8 %x) {
514 ; CHECK-LABEL: or_icmps_const_1bit_diff:
516 ; CHECK-NEXT: addb $-43, %dil
517 ; CHECK-NEXT: testb $-3, %dil
518 ; CHECK-NEXT: sete %al
520 %a = icmp eq i8 %x, 43
521 %b = icmp eq i8 %x, 45
526 define i1 @and_icmps_const_1bit_diff(i32 %x) {
527 ; CHECK-LABEL: and_icmps_const_1bit_diff:
529 ; CHECK-NEXT: addl $-44, %edi
530 ; CHECK-NEXT: testl $-17, %edi
531 ; CHECK-NEXT: setne %al
533 %a = icmp ne i32 %x, 44
534 %b = icmp ne i32 %x, 60
539 ; Negative test - extra use prevents optimization
541 define i1 @or_icmps_const_1bit_diff_extra_use(i8 %x, i8* %p) {
542 ; CHECK-LABEL: or_icmps_const_1bit_diff_extra_use:
544 ; CHECK-NEXT: cmpb $45, %dil
545 ; CHECK-NEXT: sete %cl
546 ; CHECK-NEXT: cmpb $43, %dil
547 ; CHECK-NEXT: sete %al
548 ; CHECK-NEXT: sete (%rsi)
549 ; CHECK-NEXT: orb %cl, %al
551 %a = icmp eq i8 %x, 43
552 %b = icmp eq i8 %x, 45
554 %z = zext i1 %a to i8
559 ; Negative test - constant diff is >1 bit
561 define i1 @and_icmps_const_not1bit_diff(i32 %x) {
562 ; CHECK-LABEL: and_icmps_const_not1bit_diff:
564 ; CHECK-NEXT: cmpl $44, %edi
565 ; CHECK-NEXT: setne %cl
566 ; CHECK-NEXT: cmpl $92, %edi
567 ; CHECK-NEXT: setne %al
568 ; CHECK-NEXT: andb %cl, %al
570 %a = icmp ne i32 %x, 44
571 %b = icmp ne i32 %x, 92
576 ; Negative test - wrong comparison
578 define i1 @and_icmps_const_1bit_diff_wrong_pred(i32 %x) {
579 ; CHECK-LABEL: and_icmps_const_1bit_diff_wrong_pred:
581 ; CHECK-NEXT: cmpl $43, %edi
582 ; CHECK-NEXT: sete %cl
583 ; CHECK-NEXT: cmpl $45, %edi
584 ; CHECK-NEXT: setl %al
585 ; CHECK-NEXT: orb %cl, %al
587 %a = icmp eq i32 %x, 43
588 %b = icmp slt i32 %x, 45
593 ; Negative test - no common operand
595 define i1 @and_icmps_const_1bit_diff_common_op(i32 %x, i32 %y) {
596 ; CHECK-LABEL: and_icmps_const_1bit_diff_common_op:
598 ; CHECK-NEXT: cmpl $43, %edi
599 ; CHECK-NEXT: sete %cl
600 ; CHECK-NEXT: cmpl $45, %esi
601 ; CHECK-NEXT: sete %al
602 ; CHECK-NEXT: orb %cl, %al
604 %a = icmp eq i32 %x, 43
605 %b = icmp eq i32 %y, 45
610 ; PR44136 - fold cmpeq(or(X,Y),X) --> cmpeq(and(~X,Y),0)
612 define i1 @or_cmp_eq_i64(i64 %x, i64 %y) {
613 ; NOBMI-LABEL: or_cmp_eq_i64:
615 ; NOBMI-NEXT: notq %rdi
616 ; NOBMI-NEXT: testq %rsi, %rdi
617 ; NOBMI-NEXT: sete %al
620 ; BMI-LABEL: or_cmp_eq_i64:
622 ; BMI-NEXT: andnq %rsi, %rdi, %rax
626 %c = icmp eq i64 %o, %x
630 define i1 @or_cmp_ne_i32(i32 %x, i32 %y) {
631 ; NOBMI-LABEL: or_cmp_ne_i32:
633 ; NOBMI-NEXT: notl %esi
634 ; NOBMI-NEXT: testl %edi, %esi
635 ; NOBMI-NEXT: setne %al
638 ; BMI-LABEL: or_cmp_ne_i32:
640 ; BMI-NEXT: andnl %edi, %esi, %eax
641 ; BMI-NEXT: setne %al
644 %c = icmp ne i32 %o, %y
648 define i1 @or_cmp_eq_i16(i16 zeroext %x, i16 zeroext %y) {
649 ; NOBMI-LABEL: or_cmp_eq_i16:
651 ; NOBMI-NEXT: notl %edi
652 ; NOBMI-NEXT: testl %esi, %edi
653 ; NOBMI-NEXT: sete %al
656 ; BMI-LABEL: or_cmp_eq_i16:
658 ; BMI-NEXT: andnl %esi, %edi, %eax
662 %c = icmp eq i16 %x, %o
666 define i1 @or_cmp_ne_i8(i8 zeroext %x, i8 zeroext %y) {
667 ; CHECK-LABEL: or_cmp_ne_i8:
669 ; CHECK-NEXT: notb %sil
670 ; CHECK-NEXT: testb %dil, %sil
671 ; CHECK-NEXT: setne %al
674 %c = icmp ne i8 %y, %o
678 ; Don't fold vectors.
679 define <4 x i32> @or_cmp_eq_v4i32(<4 x i32> %x, <4 x i32> %y) {
680 ; CHECK-LABEL: or_cmp_eq_v4i32:
682 ; CHECK-NEXT: por %xmm0, %xmm1
683 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm0
685 %o = or <4 x i32> %x, %y
686 %c = icmp eq <4 x i32> %o, %x
687 %s = sext <4 x i1> %c to <4 x i32>
691 define <16 x i8> @or_cmp_ne_v4i32(<16 x i8> %x, <16 x i8> %y) {
692 ; CHECK-LABEL: or_cmp_ne_v4i32:
694 ; CHECK-NEXT: por %xmm0, %xmm1
695 ; CHECK-NEXT: pcmpeqb %xmm1, %xmm0
696 ; CHECK-NEXT: pcmpeqd %xmm1, %xmm1
697 ; CHECK-NEXT: pxor %xmm1, %xmm0
699 %o = or <16 x i8> %x, %y
700 %c = icmp ne <16 x i8> %o, %x
701 %s = sext <16 x i1> %c to <16 x i8>