[llvm-branch-commits] [llvm] [Support][llvm-mc] Match the full diagnostic message in llvm-mc --verify (PR #242553)
Alexander Richardson via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Nov 22 20:02:43 PST 2026
arichardson wrote:
I looked at how much breakage switching the default would cause for MLIR and it's significant since many tests only match a substring and there will be downstream MLIR users that would also be affected, so definitely needs to remain llvm-mc only.
An AI investigation of flipping the default to full-message matching for MLIR, measured on a clean `check-mlir` run (5,031 tests, 0 failures at baseline):
> - 328 tests fail, out of the ~671 files in `mlir/test` that use `--verify-diagnostics` (~49%).
> - 3,734 directives fail, out of ~9,882 `expected-*` lines in `mlir/test` (~38%):
> - 2,933 match text in the middle of the message, mostly because they leave out the leading `'dialect.op' op ` (e.g. `expected-error {{op failed to verify that ...}}`).
> - 799 match only the start of the message, e.g. they leave out the printed op IR that follows `failed to legalize operation '...'`.
> - 2 are `-re` patterns that only match part of the message.
> - Most affected areas: Target/LLVMIR (34 tests), Dialect/SPIRV (27), Dialect/Linalg (21), Dialect/Transform (13), Conversion/AMDGPUToROCDL (13), Dialect/LLVMIR (12), Dialect/Tosa (10).
>
> Leaving out the op-name prefix is the normal MLIR convention and changing the default would also break downstream MLIR projects.
https://github.com/llvm/llvm-project/pull/242553
More information about the llvm-branch-commits
mailing list