[llvm] [SCEV] Allow adds of constants in tryToReuseLCSSAPhi. (PR #150693)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 06:16:07 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)));
----------------
nikic wrote:
```suggestion
match(Op, m_scev_Add(m_SCEVConstant(), m_SCEV(Op)));
```
For consistency?
https://github.com/llvm/llvm-project/pull/150693
More information about the llvm-commits
mailing list