[llvm] [SCEVPatternMatch] Extend m_scev_AffineAddRec with Loop (PR #141132)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu May 22 13:27:44 PDT 2025


================
@@ -198,7 +204,8 @@ m_scev_UDiv(const Op0_t &Op0, const Op1_t &Op1) {
 
 template <typename Op0_t, typename Op1_t>
 inline SCEVBinaryExpr_match<SCEVAddRecExpr, Op0_t, Op1_t>
-m_scev_AffineAddRec(const Op0_t &Op0, const Op1_t &Op1) {
+m_scev_AffineAddRec(const Op0_t &Op0, const Op1_t &Op1,
+                    const Loop *L = nullptr) {
   return m_scev_Binary<SCEVAddRecExpr>(Op0, Op1);
----------------
nikic wrote:

You're not actually passing L to the matcher here...

https://github.com/llvm/llvm-project/pull/141132


More information about the llvm-commits mailing list