[llvm] [VPlan] Dispatch to multiple exit blocks via middle blocks. (PR #112138)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 07:23:41 PST 2024


================
@@ -921,8 +915,18 @@ VPlanPtr VPlan::createInitialVPlan(Type *InductionTy,
   //    we unconditionally branch to the scalar preheader.  Do nothing.
   // 3) Otherwise, construct a runtime check.
   BasicBlock *IRExitBlock = TheLoop->getUniqueExitBlock();
----------------
david-arm wrote:

I think you should just be able to do

```
  BasicBlock *IRExitBlock = TheLoop->getUniqueLatchExitBlock();
```

here and remove the logic below.

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


More information about the llvm-commits mailing list