[PATCH] D121618: [LV] Move code to place pointer induction increment to VPlan post-processing.
Ayal Zaks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 29 11:15:01 PDT 2022
Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.
Looks fine to me, with a couple of nits.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9602
// A pointer induction, performed by using a gep
- BasicBlock *LoopLatch =
- State.LI->getLoopFor(State.CFG.PrevBB)->getLoopLatch();
+ const DataLayout &DL = CanonicalIV->getModule()->getDataLayout();
+ Instruction *InductionLoc = &*State.Builder.GetInsertPoint();
----------------
nit: can NewPointerPhi be used instead of CanonicalIV, which seems less relevant?
================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:990
+ PHINode *Phi = nullptr;
+ if (auto *WidenPhi = dyn_cast<VPWidenPointerInductionRecipe>(&R)) {
+ // TODO: Split off the case that all users of a pointer phi are scalar
----------------
nit: reverse the condition to handle the simpler int or fp case first.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121618/new/
https://reviews.llvm.org/D121618
More information about the llvm-commits
mailing list