[PATCH] D147963: [LV] Use VPValue for SCEV expansion in fixupIVUsers.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 17 09:19:25 PDT 2023
Ayal added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3385
+ Value *Step = nullptr;
for (User *U : OrigPhi->users()) {
auto *UI = cast<Instruction>(U);
----------------
fhahn wrote:
> Ayal wrote:
> > Would it make sense to look for the IV recipe that corresponds to OrigPhi (with overridden getVPValue() or by scanning header phi recipes) and then reach its Step, instead of looking for StepR in preheader and relying on II.getStep()?
> > (Traversing IV recipes (or live-outs) instead of original phi's could probably follow.)
> Unfortunately we cannot rely on mapping IV recipes to `OrigPhi` here, as an original `VPWidenIntOrFpInductionRecipe` ( which maps to `OrigPhi`) could be transformed to a `VPScalarIVStepsRecipe`, which doesn't store `OrigPhi`.
>
> This will only be cleaned up once we completely model fixing up inductions in VPlan.
ok, deserves a TODO note emphasizing it's a temporary solution.
Worth recording a SCEVtoExpandSCEVRecipe mapping in VPlan (with a note that it too is temporary)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147963/new/
https://reviews.llvm.org/D147963
More information about the llvm-commits
mailing list