[llvm] [InstSimplify][InstCombine] Remove unnecessary `m_c_*` matchers. (PR #81712)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 02:22:05 PST 2024
================
@@ -3246,8 +3246,8 @@ static bool trySimplifyICmpWithAdds(CmpInst::Predicate Pred, Value *LHS,
Value *X;
const APInt *C1, *C2;
- if (!match(LHS, m_c_Add(m_Value(X), m_APInt(C1))) ||
- !match(RHS, m_c_Add(m_Specific(X), m_APInt(C2))))
+ if (!match(LHS, m_Add(m_Value(X), m_APInt(C1))) ||
----------------
nikic wrote:
We only handle non-canonical patterns in InstSimplify if there is phase-ordering justification to do so, which is absent here. I did check the original review to confirm that this was done simply "because we can" and not for a specific reason.
https://github.com/llvm/llvm-project/pull/81712
More information about the llvm-commits
mailing list