diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-08-07 04:25:39 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-08-07 04:25:39 +0000 | 
| commit | d670e5c88a2c9a804a8480b4637a6b27a962d842 (patch) | |
| tree | 0784b0c71dd168af59ae66da35aec830f59692a9 /llvm | |
| parent | 983a415b6a3878ec9c0d08429159789461197247 (diff) | |
| download | bcm5719-llvm-d670e5c88a2c9a804a8480b4637a6b27a962d842.tar.gz bcm5719-llvm-d670e5c88a2c9a804a8480b4637a6b27a962d842.zip  | |
New testcases for PR615
llvm-svn: 22689
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll | 11 | ||||
| -rw-r--r-- | llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll | 11 | 
2 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll b/llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll new file mode 100644 index 00000000000..d038d827172 --- /dev/null +++ b/llvm/test/Regression/Transforms/TailCallElim/dont-tce-tail-marked-call.ll @@ -0,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 +} diff --git a/llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll b/llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll new file mode 100644 index 00000000000..1428e052705 --- /dev/null +++ b/llvm/test/Regression/Transforms/TailCallElim/move_alloca_for_tail_call.ll @@ -0,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 +}  | 

