[all-commits] [llvm/llvm-project] 7682f6: [MLIR][LLVMIR] Import calls with mismatching signa...
Bruno Cardoso Lopes via All-commits
all-commits at lists.llvm.org
Mon May 5 16:27:58 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7682f663b571830c937156a338017caf0c83e7cd
https://github.com/llvm/llvm-project/commit/7682f663b571830c937156a338017caf0c83e7cd
Author: Bruno Cardoso Lopes <bruno.cardoso at gmail.com>
Date: 2025-05-05 (Mon, 05 May 2025)
Changed paths:
M mlir/include/mlir/Target/LLVMIR/ModuleImport.h
M mlir/lib/Target/LLVMIR/ModuleImport.cpp
M mlir/test/Target/LLVMIR/Import/import-failure.ll
M mlir/test/Target/LLVMIR/Import/instructions.ll
Log Message:
-----------
[MLIR][LLVMIR] Import calls with mismatching signature as indirect call (#135895)
LLVM IR currently [accepts](https://godbolt.org/z/nqnEsW1ja):
```
define void @incompatible_call_and_callee_types() {
call void @callee(i64 0)
ret void
}
define void @callee({ptr, i64}, i32) {
ret void
}
```
This currently fails to import. Even though these constructs are
dangerous and probably indicate some ODR violation (or optimization
bug), they are "valid" and should be imported into LLVM IR dialect. This
PR implements that by using an indirect call to represent it.
Translation already works nicely and outputs the same source llvm IR
file.
The error is now a warning, the tests in
`mlir/test/Target/LLVMIR/Import/import-failure.ll` already use `CHECK`
lines, so no need to add extra diagnostic tests.
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