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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 23 11:27:59 PST 2024


================
@@ -1375,6 +1375,10 @@ bool LoopVectorizationLegality::isFixedOrderRecurrence(
 }
 
 bool LoopVectorizationLegality::blockNeedsPredication(BasicBlock *BB) const {
+  // When vectorizing early exits, create predicates for all blocks, except the
+  // header.
+  if (hasUncountableEarlyExit() && BB != TheLoop->getHeader())
----------------
fhahn wrote:

Yeah given that this is now directly tied to what is supported by `hasUncountableEarlyExit` I think it makes sense to rely on the structure; updated, thanks

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


More information about the llvm-commits mailing list