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

via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 16 16:24:36 PDT 2024


================
@@ -852,6 +919,16 @@ void VPlan::execute(VPTransformState *State) {
   State->CFG.DTU.applyUpdates(
       {{DominatorTree::Delete, VectorPreHeader, State->CFG.ExitBB}});
 
+  // Disconnect the middle block from its single successor (the scalar loop
+  // header) in both the CFG and DT. The branch will be created during VPlan
+  // execution.
+  BasicBlock *MiddleBB = State->CFG.ExitBB;
+  State->CFG.DTU.applyUpdates(
----------------
ayalz wrote:

applyUpdates after the blocks have been disconnected?

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


More information about the llvm-commits mailing list