[all-commits] [llvm/llvm-project] b78cee: [mlir][scf] Fix crash in extractFixedOuterLoops wi...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Wed Mar 11 06:22:20 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b78ceef43ea959954186aa2915a0b6bd763d579b
      https://github.com/llvm/llvm-project/commit/b78ceef43ea959954186aa2915a0b6bd763d579b
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2026-03-11 (Wed, 11 Mar 2026)

  Changed paths:
    M mlir/lib/Dialect/SCF/Utils/Utils.cpp
    M mlir/test/Transforms/parametric-tiling.mlir

  Log Message:
  -----------
  [mlir][scf] Fix crash in extractFixedOuterLoops with iter_args loops (#184106)

The stripmineSink helper splices loop body operations into a new inner
scf.for that has no iter_args. When the target loop carries iter_args,
values yielded by the spliced body are moved inside the inner loop, but
the outer loop's yield terminator still references those values,
creating an SSA invariant violation. In debug builds this triggers the
assertion
  use_empty() && "Cannot destroy a value that still has uses\!"
when the outer RewriterBase tries to erase the now-broken operations.

Fix: in extractFixedOuterLoops, skip the strip-mining transformation if
any of the collected perfectly-nested loops have iter_args.

Add a regression test to parametric-tiling.mlir.

Fixes #129044

Assisted-by: Claude Code



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list