[llvm] [LAA] Speculate the interleave factor for strided pointer inductions (PR #216036)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 15 01:46:46 PDT 2026
================
@@ -172,7 +247,9 @@ const SCEV *llvm::replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE,
assert(isa<SCEVUnknown>(StrideSCEV) && "shouldn't be in map");
ScalarEvolution *SE = PSE.getSE();
- const SCEV *CT = SE->getOne(StrideSCEV->getType());
+ unsigned StrideValue =
+ getSpeculatedInterleaveStride(PSE.getLoop(), *SE, StrideSCEV).value_or(1);
+ const SCEV *CT = SE->getConstant(StrideSCEV->getType(), StrideValue);
----------------
artagnon wrote:
This is also wasteful. Just store the StrideValue in StridesMap, when speculating strides.
https://github.com/llvm/llvm-project/pull/216036
More information about the llvm-commits
mailing list