1 // RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s
3 // CHECK: declare i32 @foo()
4 llvm.func @foo() -> i32
6 // CHECK-LABEL: @test_none
7 llvm.func @test_none() -> i32 {
8 // CHECK-NEXT: call i32 @foo()
9 %0 = llvm.call none @foo() : () -> i32
13 // CHECK-LABEL: @test_default
14 llvm.func @test_default() -> i32 {
15 // CHECK-NEXT: call i32 @foo()
16 %0 = llvm.call @foo() : () -> i32
20 // CHECK-LABEL: @test_musttail
21 llvm.func @test_musttail() -> i32 {
22 // CHECK-NEXT: musttail call i32 @foo()
23 %0 = llvm.call musttail @foo() : () -> i32
27 // CHECK-LABEL: @test_tail
28 llvm.func @test_tail() -> i32 {
29 // CHECK-NEXT: tail call i32 @foo()
30 %0 = llvm.call tail @foo() : () -> i32
34 // CHECK-LABEL: @test_notail
35 llvm.func @test_notail() -> i32 {
36 // CHECK-NEXT: notail call i32 @foo()
37 %0 = llvm.call notail @foo() : () -> i32