diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-05 01:22:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-05 01:22:42 +0000 |
commit | 5a62d0a038b5e4032c88f2a794a91391738c5e90 (patch) | |
tree | 797d8d3714b37c556391cb737639a663e925de19 /lib/Transforms/Scalar/InstructionCombining.cpp | |
parent | b656601943b2f1a76ee93fc3767de2ea75694672 (diff) |
remove a couple more unsafe xforms in the face of overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 83cacbab71..1e12c79e68 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -4865,10 +4865,6 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1); if (isMinValuePlusOne(CI,true)) // A <s MIN+1 -> A == MIN return new ICmpInst(ICmpInst::ICMP_EQ, Op0, SubOne(CI)); - - // (icmp slt (sub A B) 1) -> (icmp sle A B) - if (CI->isOne() && match(Op0, m_Sub(m_Value(A), m_Value(B)))) - return new ICmpInst(ICmpInst::ICMP_SLE, A, B); break; case ICmpInst::ICMP_UGT: @@ -4892,11 +4888,6 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { return new ICmpInst(ICmpInst::ICMP_NE, Op0, Op1); if (isMaxValueMinusOne(CI, true)) // A >s MAX-1 -> A == MAX return new ICmpInst(ICmpInst::ICMP_EQ, Op0, AddOne(CI)); - - // (icmp sgt (sub A B) -1) -> (icmp sge A B) - if (CI->getValue().getSExtValue() == -1 && - match(Op0, m_Sub(m_Value(A), m_Value(B)))) - return new ICmpInst(ICmpInst::ICMP_SGE, A, B); break; case ICmpInst::ICMP_ULE: |