[llvm] [LAA][LV]Allow recognition of strided pointers with constant stride (PR #171151)
John Brawn via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 5 08:12:03 PST 2026
================
@@ -1643,17 +1682,33 @@ llvm::getPtrStride(PredicatedScalarEvolution &PSE, Type *AccessTy, Value *Ptr,
}
std::optional<int64_t> Stride =
- getStrideFromAddRec(AR, Lp, AccessTy, Ptr, PSE);
- if (!ShouldCheckWrap || !Stride)
- return Stride;
+ getStrideFromAddRec(AR, Lp, AccessTy, Ptr, PSE, AllowStridedPointerIVs);
+
+ if (AllowStridedPointerIVs && Stride) {
+ // Add runtime SCEV check for multiplier
----------------
john-brawn-arm wrote:
Should clarify in the comments that it's specifically checking that the multiplier is 1.
https://github.com/llvm/llvm-project/pull/171151
More information about the llvm-commits
mailing list