xref: /llvm-project/llvm/test/CodeGen/X86/tailcallbyval.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; RUN: llc < %s -mtriple=i686-unknown-linux -tailcallopt | FileCheck %s
2%struct.s = type {i32, i32, i32, i32, i32, i32, i32, i32,
3                  i32, i32, i32, i32, i32, i32, i32, i32,
4                  i32, i32, i32, i32, i32, i32, i32, i32 }
5
6define  fastcc i32 @tailcallee(ptr byval(%struct.s) %a) nounwind {
7entry:
8        %tmp3 = load i32, ptr %a
9        ret i32 %tmp3
10; CHECK: tailcallee
11; CHECK: movl 4(%esp), %eax
12}
13
14define  fastcc i32 @tailcaller(ptr byval(%struct.s) %a) nounwind {
15entry:
16        %tmp4 = tail call fastcc i32 @tailcallee(ptr byval(%struct.s) %a )
17        ret i32 %tmp4
18; CHECK: tailcaller
19; CHECK: jmp tailcallee
20}
21