[llvm] [DAG] SDPatternMatch m_Zero/m_One/m_AllOnes have inconsistent undef h… (PR #147044)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 7 03:52:08 PDT 2025
================
@@ -4281,7 +4281,7 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
return V;
// (A - B) - 1 -> add (xor B, -1), A
- if (sd_match(N, m_Sub(m_OneUse(m_Sub(m_Value(A), m_Value(B))), m_One())))
+ if (sd_match(N, m_Sub(m_OneUse(m_Sub(m_Value(A), m_Value(B))), m_One(true))))
----------------
RKSimon wrote:
(style) `m_One(/*AllowUndefs=*/true)`
https://github.com/llvm/llvm-project/pull/147044
More information about the llvm-commits
mailing list