[all-commits] [llvm/llvm-project] 6a7ac2: [mlir] Test the final-policy remark on a failing p...

Henrich Lauko via All-commits all-commits at lists.llvm.org
Wed Sep 30 01:36:26 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a7ac2035ab788519b8cc9880972d6fa789d018f
      https://github.com/llvm/llvm-project/commit/6a7ac2035ab788519b8cc9880972d6fa789d018f
  Author: Henrich Lauko <xlauko at mail.muni.cz>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    A mlir/test/Pass/remark-final-pass-failure.mlir
    R mlir/test/Pass/remark-final-verify-diagnostics.mlir

  Log Message:
  -----------
  [mlir] Test the final-policy remark on a failing pipeline without verification (#227276)

#226258 changed mlir-opt to finalize the remark policy on every exit from
`performActions`, including when the pass pipeline fails. Before that, a
failing pipeline returned early, and remarks deferred by
`--remark-policy=final` were only emitted later from `~MLIRContext`. By then
the `SourceMgrDiagnosticHandler` had been destroyed, so the remarks were
silently dropped.

The test added in #226258, `remark-final-verify-diagnostics.mlir`, does not
catch this regression: it runs with `--verify-diagnostics`, and before #226258
the verifier's callback was never unregistered from the context. That leaked
callback still received the remark emitted from `~MLIRContext`, so the test
passed with or without the fix.

Replace it with `remark-final-pass-failure.mlir`, which runs the same failing
pipeline without `--verify-diagnostics` and checks the printed remark with
FileCheck. This test fails before #226258 and passes after it.

Assisted-by: Claude Code (Claude Opus 5.5)



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