[llvm] [LV] Support strided load with a stride of -1 (PR #128718)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 12 13:42:56 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:
I think it should be fine to add a stride argument for now, with a brief comment documenting the behavior.
https://github.com/llvm/llvm-project/pull/128718
More information about the llvm-commits
mailing list