diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-12-01 22:59:46 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-12-01 22:59:46 +0000 |
commit | 1bf891ae6e174ac92c1091be0c62891f4676beb8 (patch) | |
tree | 68f0511c8dbeac9965149c03e126ac828aed90a3 /lib/Target/ARM/ARMISelLowering.cpp | |
parent | 6566e0a55e3d9403f77db81a79a5dadedb4e666e (diff) |
Fix and re-enable tail call optimization of expanded libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120622 91177308-0d34-0410-b5e6-96231b3b80d8
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 |