[Mlir-commits] [mlir] [MLIR] Add support for calling conventions to LLVM::CallOp and LLVM::InvokeOp (PR #71319)

Tobias Gysi llvmlistbot at llvm.org
Sun Nov 5 09:19:32 PST 2023


================
@@ -329,6 +329,31 @@ llvm.func @func_args(%arg0: i32, %arg1: i32) -> i32 {
   llvm.return %12 : i32
 }
 
+// CHECK: declare fastcc void @cconv_fastcc()
+// CHECK: declare        void @cconv_ccc()
+// CHECK: declare tailcc void @cconv_tailcc()
+// CHECK: declare ghccc  void @cconv_ghccc()
+llvm.func fastcc @cconv_fastcc()
+llvm.func ccc    @cconv_ccc()
+llvm.func tailcc @cconv_tailcc()
+llvm.func cc_10  @cconv_ghccc()
+
+// CHECK: define void @test_ccs() {
+llvm.func @test_ccs() {
----------------
gysit wrote:

Can you add a test for invoke as well. It doesn't need to cover all values of the enum. 

It may also make sense to put this test in a separate file similar to comdat.mlir that, for example, could be called calling-conventions.mlir. 

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


More information about the Mlir-commits mailing list