[opaque pointer type] Allow gep_type_iterator to work with the pointee type from...
[oota-llvm.git] / lib / Target / Mips / Mips16InstrInfo.cpp
index 00d449531a10b54dbc5073c0839c1fe775e4e893..a49572efdbf99ef392cf9e53331507a9a61e880e 100644 (file)
@@ -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