[Mlir-commits] [mlir] [mlir][scf] Do not coalesce when an inner loop reads an outer iter_arg (PR #216853)

Federico Bruzzone llvmlistbot at llvm.org
Sat Sep 5 01:07:30 PDT 2026


================
@@ -414,3 +414,35 @@ module attributes {transform.with_named_sequence} {
 //       CHECK:     scf.yield %[[UPDATED]]
 //       CHECK:   }
 //       CHECK:   return %[[RESULT]]
+
+// -----
+
+// An operation sitting between the two loops of an imperfect nest and reading
+// the outer loop's iteration argument is unsound to coalesce for the same
+// reason as a read from inside the inner loop: after the merge it would see a
+// value updated on every iteration of the coalesced loop.
----------------
FedericoBruzzone wrote:

 Can we remove this comment?

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


More information about the Mlir-commits mailing list