[llvm] [LSR] Don't count conditional loads/store as enabling pre/post-index (PR #159573)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 06:36:10 PDT 2025


================
@@ -1422,15 +1428,19 @@ void Cost::RateRegister(const Formula &F, const SCEV *Reg,
         TTI->isIndexedStoreLegal(TTI->MIM_PostInc, AR->getType())) {
       const SCEV *Start;
       const SCEVConstant *Step;
-      if (match(AR, m_scev_AffineAddRec(m_SCEV(Start), m_SCEVConstant(Step))))
+      if (match(AR, m_scev_AffineAddRec(m_SCEV(Start), m_SCEVConstant(Step)))) {
----------------
artagnon wrote:

Might be good to fix this up to use m_scev_APInt() while we're here?

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


More information about the llvm-commits mailing list