diff options
Diffstat (limited to 'lib/Target/ARM/ARMISelLowering.cpp')
-rw-r--r-- | lib/Target/ARM/ARMISelLowering.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index 3c90704b7e..c162757cbd 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -1737,6 +1737,8 @@ bool ARMTargetLowering::isUsedByReturnOnly(SDNode *N) const { if (NumCopies != 1 && NumCopies != 2) return false; + + bool HasRet = false; for (unsigned i = 0; i < NumCopies; ++i) { SDNode *Copy = Copies[i]; for (SDNode::use_iterator UI = Copy->use_begin(), UE = Copy->use_end(); @@ -1749,10 +1751,11 @@ bool ARMTargetLowering::isUsedByReturnOnly(SDNode *N) const { } if (UI->getOpcode() != ARMISD::RET_FLAG) return false; + HasRet = true; } } - return true; + return HasRet; } // ConstantPool, JumpTable, GlobalAddress, and ExternalSymbol are lowered as |