[llvm] [InstCombine] Guard noundef for transformation from xor to or disjoint (PR #96905)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 07:03:18 PDT 2024
================
@@ -4593,8 +4593,12 @@ Instruction *InstCombinerImpl::visitXor(BinaryOperator &I) {
Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1);
Value *M;
if (match(&I, m_c_Xor(m_c_And(m_Not(m_Value(M)), m_Value()),
- m_c_And(m_Deferred(M), m_Value()))))
- return BinaryOperator::CreateDisjointOr(Op0, Op1);
+ m_c_And(m_Deferred(M), m_Value())))) {
+ if (isGuaranteedNotToBeUndefOrPoison(M))
----------------
vfdff wrote:
Update, thanks @dtcxzyw
https://github.com/llvm/llvm-project/pull/96905
More information about the llvm-commits
mailing list