summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-10-01 21:35:26 +0000
committerCraig Topper <craig.topper@intel.com>2018-10-01 21:35:26 +0000
commitf06a57fc898e02b024b1156ec09a92e3448d4134 (patch)
tree4cb0add215afea9a053cb0147dfc0c4747946431 /llvm/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll
parent12ae3e678d0f7efecd5eead4b6d5a06b592db3e8 (diff)
downloadbcm5719-llvm-f06a57fc898e02b024b1156ec09a92e3448d4134.tar.gz
bcm5719-llvm-f06a57fc898e02b024b1156ec09a92e3448d4134.zip
Recommit r343498 "[X86] Improve test instruction shrinking when the sign flag is used and the output of the and is truncated."
This includes a fix to prevent i16 compares with i32/i64 ands from being shrunk if bit 15 of the and is set and the sign bit is used. Original commit message: Currently we skip looking through truncates if the sign flag is used. But that's overly restrictive. It's safe to look through the truncate as long as we ensure one of the 3 things when we shrink. Either the MSB of the mask at the shrunken size isn't set. If the mask bit is set then either the shrunk size needs to be equal to the compare size or the sign There are still missed opportunities to shrink a load and fold it in here. This will be fixed in a future patch. llvm-svn: 343539
Diffstat (limited to 'llvm/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll')
-rw-r--r--llvm/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll b/llvm/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll
index 9bbd86ca646..4f6f0c9201b 100644
--- a/llvm/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll
+++ b/llvm/test/CodeGen/X86/2010-08-04-MaskedSignedCompare.ll
@@ -12,8 +12,7 @@ define i32 @main() nounwind {
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: cmpq {{.*}}(%rip), %rax
; CHECK-NEXT: sbbl %eax, %eax
-; CHECK-NEXT: andl $150, %eax
-; CHECK-NEXT: testb %al, %al
+; CHECK-NEXT: testb $-106, %al
; CHECK-NEXT: jle .LBB0_1
; CHECK-NEXT: # %bb.2: # %if.then
; CHECK-NEXT: movl $1, {{.*}}(%rip)
OpenPOWER on IntegriCloud