It's not necessary to do rounding for alloca operations when the requested
alignment is equal to the stack alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40004 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/ExecutionEngine/2005-12-02-TailCallBug.ll b/test/ExecutionEngine/2005-12-02-TailCallBug.ll
new file mode 100644
index 0000000..447f49e
--- /dev/null
+++ b/test/ExecutionEngine/2005-12-02-TailCallBug.ll
@@ -0,0 +1,21 @@
+; PR672
+; RUN: llvm-upgrade < %s | llvm-as | lli
+
+int %main(){
+ %f = cast int (int, int*, int)* %check_tail to int*
+ %res = tail call fastcc int %check_tail( int 10, int* %f,int 10)
+ ret int %res
+}
+fastcc int %check_tail(int %x, int* %f, int %g) {
+ %tmp1 = setgt int %x, 0
+ br bool %tmp1, label %if-then, label %if-else
+
+if-then:
+ %fun_ptr = cast int* %f to int(int, int*, int)*
+ %arg1 = add int %x, -1
+ %res = tail call fastcc int %fun_ptr( int %arg1, int * %f, int %g)
+ ret int %res
+
+if-else:
+ ret int %x
+}