[llvm] [VPlan] Add BranchOnMultiCond, use for early exit plans. (PR #172750)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 25 14:09:39 PST 2025
================
@@ -404,12 +404,14 @@ Early Exit Vectorization
When vectorizing a loop with a single early exit, the loop blocks following the
early exit are predicated and the vector loop will always exit via the latch.
-If the early exit has been taken, the vector loop's successor block
-(``middle.split`` below) branches to the early exit block via an intermediate
-block (``vector.early.exit`` below). This intermediate block is responsible for
-calculating any exit values of loop-defined variables that are used in the
-early exit block. Otherwise, ``middle.block`` selects between the exit block
-from the latch or the scalar remainder loop.
+It is terminated by a BranchOnTwoConds VPInstruction, which takes both the early
+and latch exiting conditions. If the early exiting condition is true,
+BranchOnToConds exits to an intermediate block (``vector.early.exit`` below).
+This intermediate block is responsible for calculating any exit values of
+loop-defined variables that are used in the early exit block. If the latch
+exiting condition is true, exits to the ``middle.block`` which selects between
+the exit block from the latch or the scalar remainder loop. Otherwise continues
----------------
fhahn wrote:
updated ,thanks
https://github.com/llvm/llvm-project/pull/172750
More information about the llvm-commits
mailing list