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

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 06:31:41 PST 2024


================
@@ -3884,10 +3887,10 @@ class VPlan {
   /// whether to execute the scalar tail loop or the exit block from the loop
   /// latch.
   const VPBasicBlock *getMiddleBlock() const {
-    return cast<VPBasicBlock>(getVectorLoopRegion()->getSingleSuccessor());
+    return cast<VPBasicBlock>(getScalarPreheader()->getSinglePredecessor());
----------------
ayalz wrote:

Works as long as the scalar preheader has a single predecessor, i.e., until runtime guards are introduced as additional predecessors.

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


More information about the llvm-commits mailing list