diff --git a/llvm/lib/Target/SBF/SBFFrameLowering.cpp b/llvm/lib/Target/SBF/SBFFrameLowering.cpp index ca03a64d3ac7d3..83f14eabcfcdc2 100644 --- a/llvm/lib/Target/SBF/SBFFrameLowering.cpp +++ b/llvm/lib/Target/SBF/SBFFrameLowering.cpp @@ -23,18 +23,16 @@ namespace { void adjustStackPointer(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, - bool Subtract) { + bool IsSubtract) { MachineFrameInfo &MFI = MF.getFrameInfo(); int NumBytes = (int)MFI.getStackSize(); - if (Subtract) - NumBytes = - NumBytes; if (NumBytes) { DebugLoc Dl; const SBFInstrInfo &TII = *static_cast(MF.getSubtarget().getInstrInfo()); BuildMI(MBB, MBBI, Dl, TII.get(SBF::ADD_ri), SBF::R11) .addReg(SBF::R11) - .addImm(NumBytes); + .addImm(IsSubtract? -NumBytes : NumBytes); } }