llvm.org GIT mirror llvm / release_30 test / CodeGen / X86 / tailcallbyval.ll
release_30

Tree @release_30 (Download .tar.gz)

tailcallbyval.ll @release_30raw · history · blame

; RUN: llc < %s -march=x86 -tailcallopt | grep TAILCALL
; RUN: llc < %s -march=x86 -tailcallopt | grep {movl\[\[:space:\]\]*4(%esp), %eax} | count 1
%struct.s = type {i32, i32, i32, i32, i32, i32, i32, i32,
                  i32, i32, i32, i32, i32, i32, i32, i32,
                  i32, i32, i32, i32, i32, i32, i32, i32 }

define  fastcc i32 @tailcallee(%struct.s* byval %a) nounwind {
entry:
        %tmp2 = getelementptr %struct.s* %a, i32 0, i32 0
        %tmp3 = load i32* %tmp2
        ret i32 %tmp3
}

define  fastcc i32 @tailcaller(%struct.s* byval %a) nounwind {
entry:
        %tmp4 = tail call fastcc i32 @tailcallee(%struct.s* byval %a )
        ret i32 %tmp4
}