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 | 241d1398e0f8267c4dd8bf860e84a2c61739c07f (patch) | |
tree | b46da98964d69daef685e8f37f24d48661483c55 /test | |
parent | 3d39fb8a3f0a29468f59456d723ac477fc549c08 (diff) | |
download | llvm-241d1398e0f8267c4dd8bf860e84a2c61739c07f.tar.gz llvm-241d1398e0f8267c4dd8bf860e84a2c61739c07f.tar.bz2 llvm-241d1398e0f8267c4dd8bf860e84a2c61739c07f.tar.xz |
Teach TailRecursionElimination to consider 'nocapture' when deciding whether
calls can be marked tail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/TailCallElim/nocapture.ll | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/Transforms/TailCallElim/nocapture.ll b/test/Transforms/TailCallElim/nocapture.ll index 87cb9dd427..e848ca5403 100644 --- a/test/Transforms/TailCallElim/nocapture.ll +++ b/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 } |