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 | 2edfe778ecf0097245d328a4d6edcd70ae7f6cbc (patch) | |
| tree | 21552293ae39ee7a0dd41bbb3fec9dd854152ab0 /llvm | |
| parent | 8f606d7b9b4df95582b8a10e0e4dd141b5f1be11 (diff) | |
| download | bcm5719-llvm-2edfe778ecf0097245d328a4d6edcd70ae7f6cbc.tar.gz bcm5719-llvm-2edfe778ecf0097245d328a4d6edcd70ae7f6cbc.zip | |
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.
llvm-svn: 128212
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index fc7e13675cb..337a4d3c468 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/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); } } |

