[Mlir-commits] [mlir] [MLIR][LLVMIR] Relax mismatching calls (PR #135895)

Bruno Cardoso Lopes llvmlistbot at llvm.org
Wed Apr 16 11:10:37 PDT 2025


bcardosolopes wrote:

> I'm somewhat certain that LLVM specifies this is illegal, but the verifier doesn't trigger. I'm currently at EuroLLVM, so I can only give more context tomorrow.

If you can share some extra context that'd be great, couldn't find much discussions around it. It *does* looks like a bug, and seems to be around long enough that several people might be "relying" on it, which is unfortunate.

Before writing this PR I ran the LLVM's verifier under the debugger and note that at the place LLVM verifier [does this check](https://github.com/llvm/llvm-project/blob/6ccc9280ba891bbea349c12a064bf23bdf9000e7/llvm/lib/IR/Verifier.cpp#L3581), `FTy` comes from `Call.getFunctionType()`, which isn't really about the actual function type. Last time this was changed was back in 2020, for what looks more like a refactor, not really a functional change (https://reviews.llvm.org/D56143).

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


More information about the Mlir-commits mailing list