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

Alessandro Potenza llvmlistbot at llvm.org
Sat Aug 29 23:57:35 PDT 2026


alepot55 wrote:

@FedericoBruzzone two things were blocking this and neither was visible from the thread.

The branch was in conflict. `mergeable_state` was `dirty`, so anyone who opened the page saw the conflict box and moved on without saying anything. It is rebased now and `3f1267228` is clean. The conflict was with the `@inner_loop_yields_induction_var` test from #216903, which lands at the end of the same file; both tests are kept.

That test is worth a word, because it coalesces a nest where the outer iteration argument *is* the inner loop's init operand, which is exactly the shape the new guard has to keep allowing. It does. On `3f1267228` I ran `mlir/test/Dialect/SCF`, `mlir/test/Dialect/Affine` and `mlir/test/Transforms`: 210 passed, 1 expectedly failed, none of them related.

The second thing is mine. You asked me on 18 August to update the PR body and I never did it. It now describes the imperfect-nest commit, and it says which shape the guard declines even though it is probably sound.

Two weeks and nobody has picked it up, so I am taking you up on your offer: would you review it?


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


More information about the Mlir-commits mailing list