diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-03-24 15:54:11 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-03-24 15:54:11 +0000 |
commit | dc31cfeb74c46fe564a350ffd20880e61d04f286 (patch) | |
tree | 4c3b71848edd109cf6e26876a7f3b54a55b88109 /lib/Transforms | |
parent | 52e37df8c05eb73e40421f0703c0d89fe854ffea (diff) | |
download | external_llvm-dc31cfeb74c46fe564a350ffd20880e61d04f286.zip external_llvm-dc31cfeb74c46fe564a350ffd20880e61d04f286.tar.gz external_llvm-dc31cfeb74c46fe564a350ffd20880e61d04f286.tar.bz2 |
It is enough for the CallInst to have no uses to be made a tail call with a ret
void; it doesn't need to have a void type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index fc7e136..337a4d3 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -644,7 +644,7 @@ bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) { if (++RI == RE) continue; CallInst *CI = dyn_cast<CallInst>(&*RI); - if (CI && CI->getType()->isVoidTy() && TLI->mayBeEmittedAsTailCall(CI)) + if (CI && CI->use_empty() && TLI->mayBeEmittedAsTailCall(CI)) TailCalls.push_back(CI); } } |