[llvm] [VPlan] Model VF as operand in VectorPointerRecipe (PR #168886)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 01:36:26 PST 2025
================
@@ -2651,7 +2651,12 @@ void VPVectorPointerRecipe::execute(VPTransformState &State) {
/*IsUnitStride*/ true, CurrentPart, Builder);
Value *Ptr = State.get(getOperand(0), VPLane(0));
- Value *Increment = createStepForVF(Builder, IndexTy, State.VF, CurrentPart);
+ Value *RuntimeVF = State.get(getVFValue(), VPLane(0));
+ RuntimeVF = Builder.CreateZExtOrTrunc(RuntimeVF, IndexTy);
+ Value *Increment =
+ CurrentPart == 1 ? RuntimeVF
+ : Builder.CreateNUWMul(
+ RuntimeVF, ConstantInt::get(IndexTy, CurrentPart));
----------------
artagnon wrote:
Can you clarify if the plan is to get rid of VPUnrolledPart altogether, and why that would be desirable? VPVectorPointer and VPVectorEndPointer are handled similarly in UnrollState::unrollRecipeByUF.
https://github.com/llvm/llvm-project/pull/168886
More information about the llvm-commits
mailing list