[llvm] [VPlan] Dispatch to multiple exit blocks via middle blocks. (PR #112138)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 02:32:00 PST 2024
================
@@ -3623,7 +3629,8 @@ void LoopVectorizationCostModel::collectLoopUniforms(ElementCount VF) {
TheLoop->getExitingBlocks(Exiting);
for (BasicBlock *E : Exiting) {
auto *Cmp = dyn_cast<Instruction>(E->getTerminator()->getOperand(0));
- if (Cmp && TheLoop->contains(Cmp) && Cmp->hasOneUse())
+ if (Cmp && TheLoop->contains(Cmp) && Cmp->hasOneUse() &&
+ (TheLoop->getLoopLatch() == E || !Legal->hasUncountableEarlyExit()))
----------------
ayalz wrote:
Update above comment?
https://github.com/llvm/llvm-project/pull/112138
More information about the llvm-commits
mailing list