[llvm] [VPlan] Expand VPWidenIntOrFpInductionRecipe into separate recipes (PR #118638)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue May 13 08:55:25 PDT 2025


================
@@ -2398,6 +2511,20 @@ void VPlanTransforms::convertToConcreteRecipes(VPlan &Plan,
   SmallVector<VPRecipeBase *> ToRemove;
   for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
            vp_depth_first_deep(Plan.getEntry()))) {
+
+    // Move VPWidenPointerInductionRecipes to the back of the phis
+    // since it may insert non-phi instructions in place, which will
+    // interfere with other header phis if they come after.
+    //
+    // TODO: Expand out VPWidenPointerInductionRecipe into multiple
+    // recipes here and remove this
----------------
fhahn wrote:

Is this needed? Could we keep track of the current firstNonPhi insert pos instead and use this?

https://github.com/llvm/llvm-project/pull/118638


More information about the llvm-commits mailing list