[llvm] [VPlan] Compute interleave count for VPlan. (PR #149702)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 1 08:59:47 PDT 2025


================
@@ -4229,7 +4229,10 @@ class VPlan {
   /// block with multiple predecessors (one for the exit via the latch and one
   /// via the other early exit).
   bool hasEarlyExit() const {
-    return ExitBlocks.size() > 1 ||
+    return count_if(ExitBlocks,
----------------
fhahn wrote:

Yes. Currently hasEarlyExit returns true for loops with multiple countable exits, for which we require a scalar epilogue and it should return false.

When I put up the patch, there was no impact of this change, but now with the 'early-exit vectorized' statistic there is, so I put up https://github.com/llvm/llvm-project/pull/151718

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


More information about the llvm-commits mailing list