[llvm-branch-commits] [llvm] [LoopInterchange] Fix instorder profitability check (PR #181991)

Ryotaro Kasuga via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Feb 20 06:21:23 PST 2026


================
@@ -1561,53 +1561,62 @@ const DenseMap<const Loop *, unsigned> &CacheCostManager::getCostMap() {
   return CostMap;
 }
 
+/// If \S contains an affine addrec for \p L0, store the step recurrence of the
+/// addrec in \p Coeff0. Same for \p L1 and \p Coeff1. This function assumes \p
+/// S is an nested affine addrec, and it will recursively look through the start
+/// value of the addrec to find the coefficients. If the expression is in a
+/// complex form, e.g., (addrec + addrec), then the coefficients may not be
+/// found.
----------------
kasuga-fj wrote:

Added, thanks.

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


More information about the llvm-branch-commits mailing list