[llvm] [VPlan] Introduce ExitPhi VPInstruction, use to create phi for FOR. (PR #94760)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 06:00:58 PDT 2024


================
@@ -8635,6 +8604,49 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
          "VPBasicBlock");
   RecipeBuilder.fixHeaderPhis();
 
+  auto *MiddleVPBB =
+      cast<VPBasicBlock>(Plan->getVectorLoopRegion()->getSingleSuccessor());
----------------
ayalz wrote:

This should be complemented in the future with
```
  auto *ScalarPHVPBB =
      cast<VPBasicBlock>(Plan->getScalarLoopRegion()->getSinglePredecessor());
```
after checking if scalar loop region exists.

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


More information about the llvm-commits mailing list