[llvm-commits] CVS: llvm/test/Regression/ExecutionEngine/2005-12-02-TailCallBug.ll
Chris Lattner
lattner at cs.uiuc.edu
Fri Dec 2 23:14:59 PST 2005
Changes in directory llvm/test/Regression/ExecutionEngine:
2005-12-02-TailCallBug.ll added (r1.1)
---
Log message:
new testcase for PR672: http://llvm.cs.uiuc.edu/PR672
---
Diffs of the changes: (+22 -0)
2005-12-02-TailCallBug.ll | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+)
Index: llvm/test/Regression/ExecutionEngine/2005-12-02-TailCallBug.ll
diff -c /dev/null llvm/test/Regression/ExecutionEngine/2005-12-02-TailCallBug.ll:1.1
*** /dev/null Sat Dec 3 01:14:57 2005
--- llvm/test/Regression/ExecutionEngine/2005-12-02-TailCallBug.ll Sat Dec 3 01:14:47 2005
***************
*** 0 ****
--- 1,22 ----
+ ; RUN: llvm-as %s | lli
+
+ ; PR672
+
+ 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
+ }
More information about the llvm-commits
mailing list