diff options
| author | Bill Wendling <isanbard@gmail.com> | 2008-08-05 21:23:45 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2008-08-05 21:23:45 +0000 |
| commit | ee12a7aefffa3e79b65692367673da0b62339cfe (patch) | |
| tree | 3a8bb4e74e40e8caaba629dcd19bef2bf8f83b19 /llvm/lib/Transforms/Scalar | |
| parent | d9b88a85f27573d09ee872268ff940ca557f3b4b (diff) | |
| download | bcm5719-llvm-ee12a7aefffa3e79b65692367673da0b62339cfe.tar.gz bcm5719-llvm-ee12a7aefffa3e79b65692367673da0b62339cfe.zip | |
Revert r53282. This was causing a miscompile on Linux. Also, the transformation
looks bogus. Please see PR2629 for details on why this is breaking things.
llvm-svn: 54372
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index c5f4dea0f0f..d15b6cf18bd 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -3586,22 +3586,6 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) { } } - - { // (icmp ugt/ult A, C) & (icmp B, C) --> (icmp (A|B), C) - // where C is a power of 2 - Value *A, *B; - ConstantInt *C1, *C2; - ICmpInst::Predicate LHSCC, RHSCC; - if (match(&I, m_And(m_ICmp(LHSCC, m_Value(A), m_ConstantInt(C1)), - m_ICmp(RHSCC, m_Value(B), m_ConstantInt(C2))))) - if (C1 == C2 && LHSCC == RHSCC && C1->getValue().isPowerOf2() && - (LHSCC == ICmpInst::ICMP_ULT || LHSCC == ICmpInst::ICMP_UGT)) { - Instruction *NewOr = BinaryOperator::CreateOr(A, B); - InsertNewInstBefore(NewOr, I); - return new ICmpInst(LHSCC, NewOr, C1); - } - } - if (ICmpInst *RHS = dyn_cast<ICmpInst>(Op1)) { // (icmp1 A, B) & (icmp2 A, B) --> (icmp3 A, B) if (Instruction *R = AssociativeOpt(I, FoldICmpLogical(*this, RHS))) |

