[llvm] [LV] Support strided load with a stride of -1 (PR #128718)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 4 06:28:53 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))
----------------
Mel-Chen wrote:
@fhahn Do you think we should introduce a new pointer recipe, or is it better to just extend the existing vector-pointer recipe? I prefer the later one.
https://github.com/llvm/llvm-project/pull/128718
More information about the llvm-commits
mailing list