[llvm] [VPlan] Connect Entry to scalar preheader during initial construction. (PR #140132)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri May 23 07:46:19 PDT 2025


================
@@ -558,6 +561,9 @@ void VPlanTransforms::prepareForVectorization(
   // The connection order corresponds to the operands of the conditional branch,
   // with the middle block already connected to the exit block.
   VPBlockUtils::connectBlocks(MiddleVPBB, ScalarPH);
+  // Also connect the entry block to the scalar preheader.
+  VPBlockUtils::connectBlocks(Plan.getEntry(), ScalarPH);
----------------
fhahn wrote:

Yep, we still need to allow terminator-less VPIRBBs for various parts of the skeleton. One of the next steps after adding it early here is adding a branch recipe.

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


More information about the llvm-commits mailing list