40 lines · plain
1// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s2 3// CHECK: declare i32 @foo()4llvm.func @foo() -> i325 6// CHECK-LABEL: @test_none7llvm.func @test_none() -> i32 {8 // CHECK-NEXT: call i32 @foo()9 %0 = llvm.call none @foo() : () -> i3210 llvm.return %0 : i3211}12 13// CHECK-LABEL: @test_default14llvm.func @test_default() -> i32 {15 // CHECK-NEXT: call i32 @foo()16 %0 = llvm.call @foo() : () -> i3217 llvm.return %0 : i3218}19 20// CHECK-LABEL: @test_musttail21llvm.func @test_musttail() -> i32 {22 // CHECK-NEXT: musttail call i32 @foo()23 %0 = llvm.call musttail @foo() : () -> i3224 llvm.return %0 : i3225}26 27// CHECK-LABEL: @test_tail28llvm.func @test_tail() -> i32 {29 // CHECK-NEXT: tail call i32 @foo()30 %0 = llvm.call tail @foo() : () -> i3231 llvm.return %0 : i3232}33 34// CHECK-LABEL: @test_notail35llvm.func @test_notail() -> i32 {36 // CHECK-NEXT: notail call i32 @foo()37 %0 = llvm.call notail @foo() : () -> i3238 llvm.return %0 : i3239}40