[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


================
@@ -8210,7 +8219,7 @@ VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst) {
   // If source is an exiting block, we know the exit edge is dynamically dead
   // in the vector loop, and thus we don't need to restrict the mask.  Avoid
   // adding uses of an otherwise potentially dead instruction.
-  if (OrigLoop->isLoopExiting(Src))
+  if (!Legal->hasUncountableEarlyExit() && OrigLoop->isLoopExiting(Src))
----------------
ayalz wrote:

Better check instead `if (OrigLoop->isLoopExiting(Src) && !(Src == Legal->getUncountableExitingBlock()))`?

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


More information about the llvm-commits mailing list