diff options
author | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-04-02 10:14:54 +0000 |
---|---|---|
committer | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-04-02 10:14:54 +0000 |
commit | b3698a53fa3797c838cbd03274b3fbc39d5d96a2 (patch) | |
tree | bf81adf9a0de532b056ec9c7081ce14a2e2735c7 /llvm/lib/Target/Mips/Mips16InstrInfo.cpp | |
parent | f3840700fa04bfc5157360b5956fbf4f509e4fd4 (diff) | |
download | bcm5719-llvm-b3698a53fa3797c838cbd03274b3fbc39d5d96a2.tar.gz bcm5719-llvm-b3698a53fa3797c838cbd03274b3fbc39d5d96a2.zip |
[mips] Make sure that we don't adjust the stack pointer by zero amount.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8638
llvm-svn: 233904
Diffstat (limited to 'llvm/lib/Target/Mips/Mips16InstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/Mips16InstrInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/Mips16InstrInfo.cpp b/llvm/lib/Target/Mips/Mips16InstrInfo.cpp index 00d449531a1..a49572efdbf 100644 --- a/llvm/lib/Target/Mips/Mips16InstrInfo.cpp +++ b/llvm/lib/Target/Mips/Mips16InstrInfo.cpp @@ -293,6 +293,9 @@ void Mips16InstrInfo::adjustStackPtrBigUnrestricted( void Mips16InstrInfo::adjustStackPtr(unsigned SP, int64_t Amount, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const { + if (Amount == 0) + return; + if (isInt<16>(Amount)) // need to change to addiu sp, ....and isInt<16> BuildAddiuSpImm(MBB, I, Amount); else |