[polly] [Polly] Consider all conditions in loop for its unbounded parameter values (PR #226549)

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 05:23:10 PDT 2026


================
@@ -794,6 +783,24 @@ bool ScopBuilder::addLoopBoundsToHeaderDomain(
     UnionBackedgeCondition = UnionBackedgeCondition.unite(BackedgeCondition);
   }
 
+  // Parameter values for which a branch condition inside the loop is not
+  // modeled correctly. The domains of the latches are derived from all these
+  // conditions, not only from the conditions of the latches themselves: the
+  // exit condition may be in another block, e.g. the header with an
+  // unconditional latch, and any other condition may decide whether the exit
+  // condition is evaluated at all. Collect them before the header's domain is
+  // restricted to the loop bounds, since the domains of the other blocks are
+  // later derived from it.
----------------
Meinersbur wrote:

Typical LLM comment: It describes the changes it made, not the current code. "Parameter values for which a branch condition inside the loop is not modeled correctly" does not apply to the state of the repository after this this commit.

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


More information about the llvm-commits mailing list