[llvm] r301412 - [x86] change tests to use sext, not zext; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 26 07:35:54 PDT 2017
Author: spatel
Date: Wed Apr 26 09:35:54 2017
New Revision: 301412
URL: http://llvm.org/viewvc/llvm-project?rev=301412&view=rev
Log:
[x86] change tests to use sext, not zext; NFC
These are intended to exercise D31944, so we need sexts.
Modified:
llvm/trunk/test/CodeGen/X86/bool-ext-inc.ll
Modified: llvm/trunk/test/CodeGen/X86/bool-ext-inc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/bool-ext-inc.ll?rev=301412&r1=301411&r2=301412&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/bool-ext-inc.ll (original)
+++ llvm/trunk/test/CodeGen/X86/bool-ext-inc.ll Wed Apr 26 09:35:54 2017
@@ -79,14 +79,15 @@ define i32 @bool_logic_and_math(i32 %a,
; CHECK-NEXT: cmpl %ecx, %edx
; CHECK-NEXT: setne %cl
; CHECK-NEXT: andb %al, %cl
-; CHECK-NEXT: movzbl %cl, %eax
-; CHECK-NEXT: incl %eax
+; CHECK-NEXT: movzbl %cl, %ecx
+; CHECK-NEXT: movl $1, %eax
+; CHECK-NEXT: subl %ecx, %eax
; CHECK-NEXT: retq
%cmp1 = icmp ne i32 %a, %b
%cmp2 = icmp ne i32 %c, %d
%and = and i1 %cmp1, %cmp2
- %zext = zext i1 %and to i32
- %add = add i32 %zext, 1
+ %ext = sext i1 %and to i32
+ %add = add i32 %ext, 1
ret i32 %add
}
@@ -99,13 +100,13 @@ define <4 x i32> @bool_logic_and_math_ve
; CHECK-NEXT: vpxor %xmm1, %xmm2, %xmm1
; CHECK-NEXT: vpandn %xmm1, %xmm0, %xmm0
; CHECK-NEXT: vpbroadcastd {{.*}}(%rip), %xmm1
-; CHECK-NEXT: vpsubd %xmm0, %xmm1, %xmm0
+; CHECK-NEXT: vpaddd %xmm1, %xmm0, %xmm0
; CHECK-NEXT: retq
%cmp1 = icmp ne <4 x i32> %a, %b
%cmp2 = icmp ne <4 x i32> %c, %d
%and = and <4 x i1> %cmp1, %cmp2
- %zext = zext <4 x i1> %and to <4 x i32>
- %add = add <4 x i32> %zext, <i32 1, i32 1, i32 1, i32 1>
+ %ext = sext <4 x i1> %and to <4 x i32>
+ %add = add <4 x i32> %ext, <i32 1, i32 1, i32 1, i32 1>
ret <4 x i32> %add
}
More information about the llvm-commits
mailing list