summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index 6f0703178f3..f2f174e5c24 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -1414,12 +1414,6 @@ Instruction *InstCombiner::visitAnd(BinaryOperator &I) {
}
}
- // (A&((~A)|B)) -> A&B
- if (match(Op0, m_c_Or(m_Not(m_Specific(Op1)), m_Value(A))))
- return BinaryOperator::CreateAnd(A, Op1);
- if (match(Op1, m_c_Or(m_Not(m_Specific(Op0)), m_Value(A))))
- return BinaryOperator::CreateAnd(A, Op0);
-
// (A ^ B) & ((B ^ C) ^ A) -> (A ^ B) & ~C
if (match(Op0, m_Xor(m_Value(A), m_Value(B))))
if (match(Op1, m_Xor(m_Xor(m_Specific(B), m_Value(C)), m_Specific(A))))
@@ -2017,18 +2011,6 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
Value *A, *B;
- // ((~A & B) | A) -> (A | B)
- if (match(Op0, m_c_And(m_Not(m_Specific(Op1)), m_Value(A))))
- return BinaryOperator::CreateOr(A, Op1);
- if (match(Op1, m_c_And(m_Not(m_Specific(Op0)), m_Value(A))))
- return BinaryOperator::CreateOr(Op0, A);
-
- // ((A & B) | ~A) -> (~A | B)
- // The NOT is guaranteed to be in the RHS by complexity ordering.
- if (match(Op1, m_Not(m_Value(A))) &&
- match(Op0, m_c_And(m_Specific(A), m_Value(B))))
- return BinaryOperator::CreateOr(Op1, B);
-
// (A & C)|(B & D)
Value *C = nullptr, *D = nullptr;
if (match(Op0, m_And(m_Value(A), m_Value(C))) &&
OpenPOWER on IntegriCloud