[llvm] [SCEV] Allow adds of constants in tryToReuseLCSSAPhi. (PR #150693)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 08:20:05 PDT 2025


================
@@ -1249,7 +1249,8 @@ Value *SCEVExpander::tryToReuseLCSSAPhi(const SCEVAddRecExpr *S) {
     // offset, if the offset is simpler.
     const SCEV *Diff = SE.getMinusSCEV(S, ExitSCEV);
     const SCEV *Op = Diff;
-    match(Diff, m_scev_Mul(m_scev_AllOnes(), m_SCEV(Op)));
+    match(Diff, m_scev_Add(m_SCEVConstant(), m_SCEV(Op)));
----------------
fhahn wrote:

done thanks

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


More information about the llvm-commits mailing list