1 ; RUN: opt < %s -globalopt -S | FileCheck %s
4 ; Check that musttail callee preserves its calling convention
6 define i32 @test(i32 %a) {
7 ; CHECK: %ca = musttail call i32 @foo(i32 %a)
8 %ca = musttail call i32 @foo(i32 %a)
12 ; CHECK-LABEL: define internal i32 @foo(i32 %a)
13 define internal i32 @foo(i32 %a) {
17 ; Check that musttail caller preserves its calling convention
19 define i32 @test2(i32 %a) {
20 %ca = call i32 @foo1(i32 %a)
24 ; CHECK-LABEL: define internal i32 @foo1(i32 %a)
25 define internal i32 @foo1(i32 %a) {
26 ; CHECK: %ca = musttail call i32 @foo2(i32 %a)
27 %ca = musttail call i32 @foo2(i32 %a)
31 ; CHECK-LABEL: define internal i32 @foo2(i32 %a)
32 define internal i32 @foo2(i32 %a) {