[Mlir-commits] [mlir] [mlir] Avoid verifying live user in conversion diagnostic (PR #210566)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jul 20 22:58:18 PDT 2026
qyingwu wrote:
> Something does not seem right to me here: the verifier should be bullet-proof and never crash. The fix likely belongs to the verifier implementation instead.
Thanks, I checked this path.
A standalone malformed SPIR-V op does not crash the verifier; it reports a normal diagnostic. The crash happens when diagnostic printing invokes `verify` while dialect conversion is in a temporary inconsistent state. In the reproducer, the stack goes through `verifyOpAndAdjustFlags` into `spirv::FuncOp::verifyBody()`, where it reads a return operand type while that operand may refer to IR being erased/rolled back.
So I think this diagnostic path should not require verification of the live user. The patch now prints the live user in generic form and uses `assumeVerified()` only for this diagnostic note.
https://github.com/llvm/llvm-project/pull/210566
More information about the Mlir-commits
mailing list