summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86InstrArithmetic.td
diff options
context:
space:
mode:
authorManman Ren <mren@apple.com>2012-07-18 21:40:01 +0000
committerManman Ren <mren@apple.com>2012-07-18 21:40:01 +0000
commit62a89f5808bbb620767d95adb784978ed2e7bff0 (patch)
tree170f0bd3a274ea211c6ee4d6ee571eb114f3e68c /lib/Target/X86/X86InstrArithmetic.td
parentd4d961615c67082bc24bfa5d372a93a1dcff3457 (diff)
downloadllvm-62a89f5808bbb620767d95adb784978ed2e7bff0.tar.gz
llvm-62a89f5808bbb620767d95adb784978ed2e7bff0.tar.bz2
llvm-62a89f5808bbb620767d95adb784978ed2e7bff0.tar.xz
X86: remove redundant cmp against zero.
Updated OptimizeCompare in peephole to remove redundant cmp against zero. We only remove Compare if CF and OF are not used. rdar://11855129 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrArithmetic.td')
-rw-r--r--lib/Target/X86/X86InstrArithmetic.td2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/X86/X86InstrArithmetic.td b/lib/Target/X86/X86InstrArithmetic.td
index c2b59b40ef..b6ba68fff0 100644
--- a/lib/Target/X86/X86InstrArithmetic.td
+++ b/lib/Target/X86/X86InstrArithmetic.td
@@ -1156,7 +1156,7 @@ defm CMP : ArithBinOp_F<0x38, 0x3A, 0x3C, "cmp", MRM7r, MRM7m, X86cmp, 0, 0>;
def X86testpat : PatFrag<(ops node:$lhs, node:$rhs),
(X86cmp (and_su node:$lhs, node:$rhs), 0)>;
-let Defs = [EFLAGS] in {
+let isCompare = 1, Defs = [EFLAGS] in {
let isCommutable = 1 in {
def TEST8rr : BinOpRR_F<0x84, "test", Xi8 , X86testpat, MRMSrcReg>;
def TEST16rr : BinOpRR_F<0x84, "test", Xi16, X86testpat, MRMSrcReg>;