[llvm] [SCEV] Add dedicated AffineAddRec matcher + loop matchers (NFC). (PR #141141)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat May 24 02:01:41 PDT 2025
================
@@ -808,7 +808,8 @@ static bool isLoopCounter(PHINode* Phi, Loop *L,
return false;
const SCEV *S = SE->getSCEV(Phi);
- if (!match(S, m_scev_AffineAddRec(m_SCEV(), m_scev_One())) ||
+ if (!match(S,
+ m_scev_AffineAddRec(m_SCEV(), m_scev_One(), m_SpecificLoop(L))) ||
cast<SCEVAddRecExpr>(S)->getLoop() != L)
----------------
nikic wrote:
Should drop this check now.
https://github.com/llvm/llvm-project/pull/141141
More information about the llvm-commits
mailing list