mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-23 04:28:30 +00:00
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
This commit is contained in:
parent
52e37df8c0
commit
dc31cfeb74
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user