[llvm] [LV] Support strided load with a stride of -1 (PR #128718)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu May 29 01:45:12 PDT 2025
================
@@ -2126,8 +2126,13 @@ void VPVectorPointerRecipe::execute(VPTransformState &State) {
Value *Ptr = State.get(getOperand(0), VPLane(0));
Value *Increment = createStepForVF(Builder, IndexTy, State.VF, CurrentPart);
+ // TODO: Support non-unit-reverse strided accesses.
+ Value *Index =
+ Strided
+ ? Builder.CreateMul(Increment, ConstantInt::getSigned(IndexTy, -1))
----------------
fhahn wrote:
It is a bit confusing that VPVectorPointerRecipe w/o stride steps by positive increment and with `Strided` by negative increment. Should it be VectorPointerEndRecipe?
https://github.com/llvm/llvm-project/pull/128718
More information about the llvm-commits
mailing list