diff options
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCompares.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp index 00807a391a..1b96c3cca4 100644 --- a/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -2034,15 +2034,6 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { CI->countTrailingZeros())); } - // Turn x&~y == 0 into x&y != 0 if x is a power of 2. - Value *X = 0, *Y = 0; - if (match(Op0, m_And(m_Value(X), m_Not(m_Value(Y)))) && - match(Op1, m_Zero()) && isKnownToBeAPowerOfTwo(X, TD)) { - return new ICmpInst(ICmpInst::ICMP_NE, - Builder->CreateAnd(X, Y), - Op1); - } - break; } case ICmpInst::ICMP_NE: { @@ -2080,15 +2071,6 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { CI->countTrailingZeros())); } - // Turn x&~y != 0 into x&y == 0 if x is a power of 2. - Value *X = 0, *Y = 0; - if (match(Op0, m_And(m_Value(X), m_Not(m_Value(Y)))) && - match(Op1, m_Zero()) && isKnownToBeAPowerOfTwo(X, TD)) { - return new ICmpInst(ICmpInst::ICMP_EQ, - Builder->CreateAnd(X, Y), - Op1); - } - break; } case ICmpInst::ICMP_ULT: |