[llvm-commits] CVS: llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll move_alloca_for_tail_call.ll
Chris Lattner
lattner at cs.uiuc.edu
Sat Aug 6 21:25:50 PDT 2005
Changes in directory llvm/test/Regression/Transforms/TailCallElim:
dont-tce-tail-marked-call.ll added (r1.1)
move_alloca_for_tail_call.ll added (r1.1)
---
Log message:
New testcases for PR615: http://llvm.cs.uiuc.edu/PR615
---
Diffs of the changes: (+22 -0)
dont-tce-tail-marked-call.ll | 11 +++++++++++
move_alloca_for_tail_call.ll | 11 +++++++++++
2 files changed, 22 insertions(+)
Index: llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll
diff -c /dev/null llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll:1.1
*** /dev/null Sat Aug 6 23:25:49 2005
--- llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll Sat Aug 6 23:25:39 2005
***************
*** 0 ****
--- 1,11 ----
+ ; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | grep 'call int %foo'
+
+ declare void %bar(int*)
+ int %foo(uint %N) {
+ %A = alloca int, uint %N ;; Should stay in entry block because of 'tail' marker
+ store int 17, int* %A
+ call void %bar(int* %A)
+
+ %X = tail call int %foo(uint %N) ;; Cannot -tailcallelim this without increasing stack usage!
+ ret int %X
+ }
Index: llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll
diff -c /dev/null llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll:1.1
*** /dev/null Sat Aug 6 23:25:50 2005
--- llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll Sat Aug 6 23:25:39 2005
***************
*** 0 ****
--- 1,11 ----
+ ; RUN: llvm-as < %s | opt -tailcallelim | llvm-dis | %prcontext alloca 1 | grep 'int %foo'
+
+ declare void %bar(int*)
+ int %foo() {
+ %A = alloca int ;; Should stay in entry block because of 'tail' marker
+ store int 17, int* %A
+ call void %bar(int* %A)
+
+ %X = tail call int %foo()
+ ret int %X
+ }
More information about the llvm-commits
mailing list