From 38ada868f24b639512e4cfe07871ccea05e09f1a Mon Sep 17 00:00:00 2001 From: Arnold Schwaighofer Date: Sat, 10 Nov 2007 10:48:01 +0000 Subject: Update tailcall code to include inline attribute operand for memcpy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43978 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/X86/tailcallbyval.ll | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/CodeGen/X86/tailcallbyval.ll (limited to 'test/CodeGen/X86/tailcallbyval.ll') diff --git a/test/CodeGen/X86/tailcallbyval.ll b/test/CodeGen/X86/tailcallbyval.ll new file mode 100644 index 0000000000..dc1dea7e11 --- /dev/null +++ b/test/CodeGen/X86/tailcallbyval.ll @@ -0,0 +1,15 @@ +; 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 +} -- cgit v1.2.3