diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2012-10-21 23:51:22 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2012-10-21 23:51:22 +0000 |
commit | 2d28f2bf837c32cd3d05f2196d30460ce2c7f883 (patch) | |
tree | 9b343b439d3415400bac79095b68ab886472e6d6 /llvm/test | |
parent | c25be714260258b09ff6a0779fa596c5e8642935 (diff) | |
download | bcm5719-llvm-2d28f2bf837c32cd3d05f2196d30460ce2c7f883.tar.gz bcm5719-llvm-2d28f2bf837c32cd3d05f2196d30460ce2c7f883.zip |
Teach TailRecursionElimination to consider 'nocapture' when deciding whether
calls can be marked tail.
llvm-svn: 166405
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Transforms/TailCallElim/nocapture.ll | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/test/Transforms/TailCallElim/nocapture.ll b/llvm/test/Transforms/TailCallElim/nocapture.ll index 87cb9dd427b..e848ca5403a 100644 --- a/llvm/test/Transforms/TailCallElim/nocapture.ll +++ b/llvm/test/Transforms/TailCallElim/nocapture.ll @@ -1,7 +1,7 @@ ; RUN: opt %s -tailcallelim -S | FileCheck %s -; XFAIL: * declare void @use(i8* nocapture, i8* nocapture) +declare void @boring() define i8* @foo(i8* nocapture %A, i1 %cond) { ; CHECK: tailrecurse: @@ -19,7 +19,9 @@ cond_true: cond_false: ; CHECK: cond_false call void @use(i8* %A, i8* %B) -; CHECK: tail call void @use(i8* %A.tr, i8* %B) +; CHECK: call void @use(i8* %A.tr, i8* %B) + call void @boring() +; CHECK: tail call void @boring() ret i8* null ; CHECK: ret i8* null } |