[PATCH] D121615: [VPlan] Add VPWidenPointerInductionRecipe.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 03:35:43 PDT 2022


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:8213
 
-VPWidenIntOrFpInductionRecipe *VPRecipeBuilder::tryToOptimizeInductionPHI(
+VPRecipeBase *VPRecipeBuilder::tryToOptimizeInductionPHI(
     PHINode *Phi, ArrayRef<VPValue *> Operands, VFRange &Range) const {
----------------
Ayal wrote:
> Return a pointer to VPHeaderPhiRecipe ?
Unfortunately `VPWidenIntOrFpInductionRecipe` still needs converting to `VPHeaderPHIRecipe`. this can be done now, after moving all code-gen paths that do not generate a header phi out of the recipe.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9604
+  SCEVExpander Exp(SE, DL, "induction");
+  Value *ScalarStepValue = Exp.expandCodeFor(ScalarStep, PhiType, InductionLoc);
+  Value *RuntimeVF = getRuntimeVF(State.Builder, PhiType, State.VF);
----------------
Ayal wrote:
> Should this be refactored out into a SCEV expand recipe (in a follow-up patch)?
Yes!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121615/new/

https://reviews.llvm.org/D121615



More information about the llvm-commits mailing list