[llvm] [VPlan] Compute induction end values in VPlan. (PR #112145)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 15:27:14 PST 2024
================
@@ -10206,6 +10187,57 @@ LoopVectorizePass::LoopVectorizePass(LoopVectorizeOptions Opts)
VectorizeOnlyWhenForced(Opts.VectorizeOnlyWhenForced ||
!EnableLoopVectorization) {}
+/// Prepare \p MainPlan for vectorizing the main vector loop during epilogue
+/// vectorization. Remove ResumePhis from \p MainPlan for inductions that
+/// don't have a corresponding wide induction in \p EpiPlan.
+static void preparePlanForMainVectorLoop(VPlan &MainPlan, VPlan &EpiPlan) {
+ // Collect PHI nodes of widened phis in the VPlan for the epilogue. Those
+ // will need their resume-values computed in the main vector loop. Others
+ // can be removed from the main VPlan.
+ SmallPtrSet<PHINode *, 2> EpiWidenedPhis;
+ for (VPRecipeBase &R :
----------------
ayalz wrote:
nit: auto?
https://github.com/llvm/llvm-project/pull/112145
More information about the llvm-commits
mailing list