[llvm] [LV] Transform to handle exits in the scalar loop (PR #148626)

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 01:57:40 PST 2025


================
@@ -4182,6 +4182,14 @@ class VPlan {
   /// VPlan is destroyed.
   SmallVector<VPBlockBase *> CreatedBlocks;
 
+  /// The entry block in a vplan, which may be a check block that needs to
+  /// be wired up in the right place with existing check blocks.
+  std::optional<VPBasicBlock *> EarlyExitPreheader;
+
+  /// Indicates that an early exit loop will exit before the condition is
+  /// reached, and that the scalar loop must perform the last few iterations.
----------------
gbossu wrote:

Could you clarify `the condition is reached`? I guess you mean the "latch" loop condition?

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


More information about the llvm-commits mailing list