[llvm] [LAA][LV]Allow recognition of strided pointers with constant stride (PR #171151)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 16 08:54:28 PST 2026
================
@@ -480,9 +480,10 @@ int LoopVectorizationLegality::isConsecutivePtr(Type *AccessTy,
const auto &Strides =
LAI ? LAI->getSymbolicStrides() : DenseMap<Value *, const SCEV *>();
- int Stride = getPtrStride(PSE, AccessTy, Ptr, TheLoop, *DT, Strides,
- AllowRuntimeSCEVChecks, false)
- .value_or(0);
+ int Stride =
----------------
david-arm wrote:
I don't know if this is correct. I thought this function was called `isConsecutivePtr` because it wants to know if all the memory accesses are exactly one element apart. If so, then you'd need to add a SCEV check to only enter the vector loop if the Multiplier is 1.
https://github.com/llvm/llvm-project/pull/171151
More information about the llvm-commits
mailing list