[llvm] [VPlan] Retain exit conditions and edges in initial VPlan (NFC). (PR #137709)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 6 14:49:38 PDT 2025
================
@@ -182,11 +182,6 @@ void PlainCFGBuilder::createVPInstructionsForVPBB(VPBasicBlock *VPBB,
"Instruction shouldn't have been visited.");
if (auto *Br = dyn_cast<BranchInst>(Inst)) {
- if (TheLoop->getLoopLatch() == BB ||
- any_of(successors(BB),
- [this](BasicBlock *Succ) { return !TheLoop->contains(Succ); }))
- continue;
-
// Conditional branch instruction are represented using BranchOnCond
// recipes.
if (Br->isConditional()) {
----------------
ayalz wrote:
nit: seems a bit clearer to early continue?
```suggestion
if (!Br->isConditional())
continue;
```
https://github.com/llvm/llvm-project/pull/137709
More information about the llvm-commits
mailing list