[llvm] [LAA] Avoid unprofitable unit-stride versioning (PR #225331)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 00:17:53 PDT 2026
================
@@ -3219,25 +3219,24 @@ void LoopAccessInfo::collectStridedAccess(Value *MemAccess) {
// computation of an interesting IV - but we chose not to as we
// don't have a cost model here, and broadening the scope exposes
// far too many unprofitable cases.
- const SCEV *StrideExpr = getStrideFromPointer(Ptr, PSE->getSE(), TheLoop);
- if (!StrideExpr)
+ const SCEV *StrideBase = getStrideFromPointer(Ptr, PSE->getSE(), TheLoop);
+ if (!StrideBase)
return;
- if (match(StrideExpr, m_scev_UndefOrPoison()))
+ if (match(StrideBase, m_scev_UndefOrPoison()))
return;
LLVM_DEBUG(dbgs() << "LAA: Found a strided access that is a candidate for "
"versioning:");
- LLVM_DEBUG(dbgs() << " Ptr: " << *Ptr << " Stride: " << *StrideExpr << "\n");
+ LLVM_DEBUG(dbgs() << " Ptr: " << *Ptr << " Stride: " << *StrideBase << "\n");
----------------
artagnon wrote:
Could revert these changes? I think StrideExpr is a better name?
https://github.com/llvm/llvm-project/pull/225331
More information about the llvm-commits
mailing list