[llvm] [VPlan] Model epilogue skeleton in VPlan by wrapping in VPIRBBs (NFCI). (PR #222312)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 07:14:57 PDT 2026


================
@@ -5872,6 +5877,14 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
 
   ILV.printDebugTracesAtEnd();
 
+  // Wrap the generated blocks in VPIRBasicBlocks, so they can be used in the
+  // epilogue plan.
+  if (EpilogueVecKind == EpilogueVectorizationKind::MainLoop)
+    for (VPBasicBlock *VPBB : to_vector(VPBlockUtils::blocksAs<VPBasicBlock>(
----------------
artagnon wrote:

```suggestion
    for (VPBasicBlock *VPBB : make_early_inc_range(VPBlockUtils::blocksAs<VPBasicBlock>(
```

doesn't work?

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


More information about the llvm-commits mailing list