Skip to content

Commit 074f7c2

Browse files
committed
[InstCombine] Remove redundant fold (NFCI)
This has been subsumed by simplifyAndOrWithOpReplaced().
1 parent f5399e8 commit 074f7c2

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

-13
Original file line numberDiff line numberDiff line change
@@ -3660,19 +3660,6 @@ Instruction *InstCombinerImpl::visitOr(BinaryOperator &I) {
36603660
}
36613661
}
36623662

3663-
// A | ~(A | B) -> A | ~B
3664-
// A | ~(A ^ B) -> A | ~B
3665-
if (match(Op1, m_Not(m_Value(A))))
3666-
if (BinaryOperator *B = dyn_cast<BinaryOperator>(A))
3667-
if ((Op0 == B->getOperand(0) || Op0 == B->getOperand(1)) &&
3668-
Op1->hasOneUse() && (B->getOpcode() == Instruction::Or ||
3669-
B->getOpcode() == Instruction::Xor)) {
3670-
Value *NotOp = Op0 == B->getOperand(0) ? B->getOperand(1) :
3671-
B->getOperand(0);
3672-
Value *Not = Builder.CreateNot(NotOp, NotOp->getName() + ".not");
3673-
return BinaryOperator::CreateOr(Not, Op0);
3674-
}
3675-
36763663
if (SwappedForXor)
36773664
std::swap(Op0, Op1);
36783665

0 commit comments

Comments
 (0)