[llvm] [VPlan] Model branch cond to enter scalar epilogue in VPlan. (PR #92651)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 05:25:16 PDT 2024


================
@@ -879,15 +922,41 @@ void VPlan::execute(VPTransformState *State) {
   State->CFG.ExitBB = State->CFG.PrevBB->getSingleSuccessor();
   BasicBlock *VectorPreHeader = State->CFG.PrevBB;
   State->Builder.SetInsertPoint(VectorPreHeader->getTerminator());
-  replaceVPBBWithIRVPBB(
-      cast<VPBasicBlock>(getVectorLoopRegion()->getSingleSuccessor()),
-      State->CFG.ExitBB);
 
   // Disconnect VectorPreHeader from ExitBB in both the CFG and DT.
   cast<BranchInst>(VectorPreHeader->getTerminator())->setSuccessor(0, nullptr);
   State->CFG.DTU.applyUpdates(
       {{DominatorTree::Delete, VectorPreHeader, State->CFG.ExitBB}});
 
+  // Replace regular VPBB's for the middle and scalar preheader blocks with
+  // VPIRBasicBlocks with VPIRBasicBlocks wrapping their IR blocks. The IR
----------------
ayalz wrote:

```suggestion
  // VPIRBasicBlocks wrapping their IR blocks. The IR
```

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


More information about the llvm-commits mailing list