[llvm] [InstCombine] Resolve FIXME: Use commutative matchers (PR #81060)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 16:54:31 PST 2024
================
@@ -2255,7 +2255,7 @@ Instruction *InstCombinerImpl::visitSub(BinaryOperator &I) {
// This is done in other passes, but we want to be able to consume this
// pattern in InstCombine so we can generate it without creating infinite
// loops.
- if (match(Op0, m_Add(m_Value(X), m_Value(Z))) &&
+ if (match(Op0, m_c_Add(m_Value(X), m_Value(Z))) &&
----------------
AtariDreams wrote:
The AND statement that follows it has Z in common.
https://github.com/llvm/llvm-project/pull/81060
More information about the llvm-commits
mailing list