[llvm-branch-commits] [llvm] [mlir] [mlir][LLVM] add argument and result attributes to llvm.call (PR #123177)
Tobias Gysi via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Feb 1 11:41:29 PST 2025
================
@@ -0,0 +1,17 @@
+// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
+
+llvm.func @somefunc(i32, !llvm.ptr)
+
+// CHECK-LABEL: define void @test_call_arg_attrs_direct
+llvm.func @test_call_arg_attrs_direct(%arg0: i32, %arg1: !llvm.ptr) {
+ // CHECK: call void @somefunc(i32 %{{.*}}, ptr byval(i64) %{{.*}})
+ llvm.call @somefunc(%arg0, %arg1) : (i32, !llvm.ptr {llvm.byval = i64}) -> ()
+ llvm.return
+}
+
+// CHECK-LABEL: define i16 @test_call_arg_attrs_indirec
----------------
gysit wrote:
```suggestion
// CHECK-LABEL: define i16 @test_call_arg_attrs_indirect
```
ultra nit:
https://github.com/llvm/llvm-project/pull/123177
More information about the llvm-branch-commits
mailing list