llvm-6502/test/CodeGen/X86/tailcallbyval.ll
2007-11-10 10:48:01 +00:00

16 lines
433 B
LLVM

; RUN: llvm-as < %s | llc -march=x86 -tailcallopt | grep TAILCALL
%struct.s = type { i32, i32, i32 }
define fastcc i32 @tailcallee(%struct.s* byval %a) {
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) {
entry:
%tmp4 = tail call fastcc i32 @tailcallee(%struct.s* %a byval)
ret i32 %tmp4
}