• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=x86 -tailcallopt | grep TAILCALL
2; RUN: llc < %s -march=x86 -tailcallopt | grep {movl\[\[:space:\]\]*4(%esp), %eax} | count 1
3%struct.s = type {i32, i32, i32, i32, i32, i32, i32, i32,
4                  i32, i32, i32, i32, i32, i32, i32, i32,
5                  i32, i32, i32, i32, i32, i32, i32, i32 }
6
7define  fastcc i32 @tailcallee(%struct.s* byval %a) nounwind {
8entry:
9        %tmp2 = getelementptr %struct.s* %a, i32 0, i32 0
10        %tmp3 = load i32* %tmp2
11        ret i32 %tmp3
12}
13
14define  fastcc i32 @tailcaller(%struct.s* byval %a) nounwind {
15entry:
16        %tmp4 = tail call fastcc i32 @tailcallee(%struct.s* byval %a )
17        ret i32 %tmp4
18}
19