[PATCH] D121618: [LV] Move code to place pointer induction increment to VPlan post-processing.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 28 08:42:59 PDT 2022


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9604
+      &*State.Builder.GetInsertPoint());
+  NewPointerPhi->addIncoming(InductionGEP, State.CFG.VectorPreHeader);
 
----------------
Ayal wrote:
> Deserves a comment that this is temporary?
Added a similar comment to D121617


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:986
     // Skip phi-like recipes that generate their backedege values themselves.
     // TODO: Model their backedge values explicitly.
+    if (isa<VPWidenPHIRecipe>(&R))
----------------
Ayal wrote:
> Above TODO is obsolete?
Yes, removed!


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:995
+        if (all_of(WidenPhi->users(), [WidenPhi](const VPUser *U) {
+              return cast<VPRecipeBase>(U)->usesScalars(WidenPhi);
+            }))
----------------
Ayal wrote:
> An induction phi feeding only scalar users deserves a separate, non-'Widen', VP[Replicate]PointerInductionRecipe ?
Agreed, I added a todo.


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