[llvm] [VPlan] Simplify Plan's entry in removeBranchOnConst. (PR #154510)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 31 14:48:08 PDT 2025


================
@@ -7262,7 +7271,7 @@ DenseMap<const SCEV *, Value *> LoopVectorizationPlanner::executePlan(
   BasicBlock *EntryBB =
       cast<VPIRBasicBlock>(BestVPlan.getEntry())->getIRBasicBlock();
   State.CFG.PrevBB = ILV.createVectorizedLoopSkeleton();
-  replaceVPBBWithIRVPBB(BestVPlan.getScalarPreheader(),
+  replaceVPBBWithIRVPBB(BestVPlan, BestVPlan.getScalarPreheader(),
----------------
ayalz wrote:

Independent: worth documenting somewhere that `createVectorizedLoopSkeleton()` returns the predecessor of the newly created scalar preheader (which when created has a unique predecessor).

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


More information about the llvm-commits mailing list