Author: dsanders Date: Mon Apr 27 09:31:46 2015 New Revision: 235883 URL: http://llvm.org/viewvc/llvm-project?rev=235883&view=rev Log: Merging r233904: ------------------------------------------------------------------------ r233904 | vkalintiris | 2015-04-02 11:14:54 +0100 (Thu, 02 Apr 2015) | 9 lines
[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 ------------------------------------------------------------------------ Added: llvm/branches/release_36/test/CodeGen/Mips/adjust-callstack-sp.ll - copied unchanged from r233904, llvm/trunk/test/CodeGen/Mips/adjust-callstack-sp.ll Modified: llvm/branches/release_36/ (props changed) llvm/branches/release_36/lib/Target/Mips/Mips16InstrInfo.cpp llvm/branches/release_36/lib/Target/Mips/MipsSEInstrInfo.cpp Propchange: llvm/branches/release_36/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Apr 27 09:31:46 2015 @@ -1,3 +1,3 @@ /llvm/branches/Apple/Pertwee:110850,110961 /llvm/branches/type-system-rewrite:133420-134817 -/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226151,226164-226166,226170-226171,226182,226407-226409,226473,226588,226616,226652,226664,226708,226711,226755,226791,226808-226809,226905,227005,227084-227085,227087,227089,227250,227260-227261,227269,227290,227294,227299,227319,227339,227430,227491,227584,227603,227628,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228411,228444,228490,228500,228507,228518,228525,228565,228656,228760-228761,228793,228842,228899,228957,228969,228979,229029,229343,229351-229352,229421,229495,229529,229675,229731,229911,230058,230235,230657,230742,230748,231219,231227,231563,231601,232046,232085,232189,232382 +/llvm/trunk:155241,226023,226029,226044,226046,226048,226058,226075,226151,226164-226166,226170-226171,226182,226407-226409,226473,226588,226616,226652,226664,226708,226711,226755,226791,226808-226809,226905,227005,227084-227085,227087,227089,227250,227260-227261,227269,227290,227294,227299,227319,227339,227430,227491,227584,227603,227628,227670,227809,227815,227903,227934,227972,227983,228049,228129,228168,228331,228411,228444,228490,228500,228507,228518,228525,228565,228656,228760-228761,228793,228842,228899,228957,228969,228979,229029,229343,229351-229352,229421,229495,229529,229675,229731,229911,230058,230235,230657,230742,230748,231219,231227,231563,231601,232046,232085,232189,232382,233904 Modified: llvm/branches/release_36/lib/Target/Mips/Mips16InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/Target/Mips/Mips16InstrInfo.cpp?rev=235883&r1=235882&r2=235883&view=diff ============================================================================== --- llvm/branches/release_36/lib/Target/Mips/Mips16InstrInfo.cpp (original) +++ llvm/branches/release_36/lib/Target/Mips/Mips16InstrInfo.cpp Mon Apr 27 09:31:46 2015 @@ -293,6 +293,9 @@ void Mips16InstrInfo::adjustStackPtrBigU 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 Modified: llvm/branches/release_36/lib/Target/Mips/MipsSEInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_36/lib/Target/Mips/MipsSEInstrInfo.cpp?rev=235883&r1=235882&r2=235883&view=diff ============================================================================== --- llvm/branches/release_36/lib/Target/Mips/MipsSEInstrInfo.cpp (original) +++ llvm/branches/release_36/lib/Target/Mips/MipsSEInstrInfo.cpp Mon Apr 27 09:31:46 2015 @@ -364,6 +364,9 @@ void MipsSEInstrInfo::adjustStackPtr(uns unsigned ADDu = STI.isABI_N64() ? Mips::DADDu : Mips::ADDu; unsigned ADDiu = STI.isABI_N64() ? Mips::DADDiu : Mips::ADDiu; + if (Amount == 0) + return; + if (isInt<16>(Amount))// addi sp, sp, amount BuildMI(MBB, I, DL, get(ADDiu), SP).addReg(SP).addImm(Amount); else { // Expand immediate that doesn't fit in 16-bit. _______________________________________________ llvm-branch-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvm-branch-commits
