diff options
| author | Dale Johannesen <dalej@apple.com> | 2007-03-02 01:17:17 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2007-03-02 01:17:17 +0000 |
| commit | 32bc81341bdb27830cd1f4677ea4d4a7362d5ddf (patch) | |
| tree | db148ca6a17f33317e9f8860c6e7ebe9dd40efb7 /llvm | |
| parent | 197adfaa0a9ba95b0b10a7d4478c47455d73d8a1 (diff) | |
| download | bcm5719-llvm-32bc81341bdb27830cd1f4677ea4d4a7362d5ddf.tar.gz bcm5719-llvm-32bc81341bdb27830cd1f4677ea4d4a7362d5ddf.zip | |
eliminate unnecessary reset of SP in epilog on darwin
llvm-svn: 34824
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMRegisterInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMRegisterInfo.cpp b/llvm/lib/Target/ARM/ARMRegisterInfo.cpp index 503d560403c..dc7e82b86ce 100644 --- a/llvm/lib/Target/ARM/ARMRegisterInfo.cpp +++ b/llvm/lib/Target/ARM/ARMRegisterInfo.cpp @@ -1290,7 +1290,7 @@ void ARMRegisterInfo::emitEpilogue(MachineFunction &MF, } else { // Darwin ABI requires FP to point to the stack slot that contains the // previous FP. - if (STI.isTargetDarwin() || hasFP(MF)) { + if ((STI.isTargetDarwin() && NumBytes) || hasFP(MF)) { NumBytes = AFI->getFramePtrSpillOffset() - NumBytes; // Reset SP based on frame pointer only if the stack frame extends beyond // frame pointer stack slot or target is ELF and the function has FP. |

