Add testcase for r63142.
[oota-llvm.git] / test / CodeGen / X86 / tailcallbyval.ll
index dc1dea7e113ee804f461e02397fd4ed84d91a7bb..916be566a14a34ddea09588fb62531c47359418c 100644 (file)
@@ -1,14 +1,17 @@
 ; RUN: llvm-as < %s | llc -march=x86 -tailcallopt | grep TAILCALL
-%struct.s = type { i32, i32, i32 }
+; RUN: llvm-as < %s | llc -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) {
+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) {
+define  fastcc i32 @tailcaller(%struct.s* byval %a) nounwind {
 entry:
         %tmp4 = tail call fastcc i32 @tailcallee(%struct.s* %a byval)
         ret i32 %tmp4