[Mlir-commits] [mlir] [MLIR] Fix import of calls with mismatched variadic types (PR #124286)
Tobias Gysi
llvmlistbot at llvm.org
Fri Jan 24 07:54:59 PST 2025
================
@@ -1495,15 +1495,22 @@ LogicalResult ModuleImport::convertCallTypeAndOperands(
if (!callInst->getType()->isVoidTy())
types.push_back(convertType(callInst->getType()));
- if (!callInst->getCalledFunction()) {
- if (!allowInlineAsm ||
- !isa<llvm::InlineAsm>(callInst->getCalledOperand())) {
- FailureOr<Value> called = convertValue(callInst->getCalledOperand());
- if (failed(called))
- return failure();
- operands.push_back(*called);
- }
+ bool isInlineAsm = callInst->isInlineAsm();
+ if (isInlineAsm && !allowInlineAsm)
+ return failure();
+
+ // Cannot use isIndirectCall() here because we need to handle Constant callees
+ // that are not considered indirect calls by LLVM. However, in MLIR, they are
----------------
gysit wrote:
```suggestion
// that are not considered indirect calls by LLVM. However, in MLIR, they are
```
ultra nit: double space
https://github.com/llvm/llvm-project/pull/124286
More information about the Mlir-commits
mailing list