[llvm] [VPlan] Replace VPRegionBlock with explicit CFG before execute (NFCI). (PR #117506)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 14:38:33 PDT 2025
================
@@ -420,12 +433,17 @@ void VPBasicBlock::connectToPredecessors(VPTransformState &State) {
if (ParentLoop && !State.LI->getLoopFor(NewBB))
ParentLoop->addBasicBlockToLoop(NewBB, *State.LI);
+ auto Preds = to_vector(getHierarchicalPredecessors());
+ if (VPBlockUtils::isHeader(this, State.VPDT)) {
+ // There's no block yet for the latch, don't try to connect it yet.
----------------
ayalz wrote:
```suggestion
// There's no block for the latch yet, connect to the preheader only.
```
(Could create a block for the latch - like creating blocks for successors?)
https://github.com/llvm/llvm-project/pull/117506
More information about the llvm-commits
mailing list