mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 15:39:06 +00:00
Address Evan's comments for r151877.
Specifically, remove the magic number when checking to see if the copy has a glue operand and simplify the checking logic. rdar://10930395 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152041 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af71f16f93
commit
c8d7eea264
@ -1585,13 +1585,12 @@ bool X86TargetLowering::isUsedByReturnOnly(SDNode *N) const {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
SDNode *Copy = *N->use_begin();
|
SDNode *Copy = *N->use_begin();
|
||||||
if (Copy->getOpcode() != ISD::CopyToReg &&
|
if (Copy->getOpcode() == ISD::CopyToReg) {
|
||||||
Copy->getOpcode() != ISD::FP_EXTEND)
|
// If the copy has a glue operand, we conservatively assume it isn't safe to
|
||||||
return false;
|
// perform a tail call.
|
||||||
|
if (Copy->getOperand(Copy->getNumOperands()-1).getValueType() == MVT::Glue)
|
||||||
// If anything is glued to the copy, then we can't safely perform a tail call.
|
return false;
|
||||||
if (Copy->getOpcode() == ISD::CopyToReg &&
|
} else if (Copy->getOpcode() != ISD::FP_EXTEND)
|
||||||
Copy->getNumOperands() == 4)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
bool HasRet = false;
|
bool HasRet = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user