[PATCH] D82557: [MSP430][NFC] Remove redundant condition
Balogh, Ádám via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 26 04:18:38 PDT 2020
baloghadamsoftware updated this revision to Diff 273652.
baloghadamsoftware added a comment.
Removed commented-out lines.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82557/new/
https://reviews.llvm.org/D82557
Files:
llvm/lib/Target/MSP430/MSP430FrameLowering.cpp
Index: llvm/lib/Target/MSP430/MSP430FrameLowering.cpp
===================================================================
--- llvm/lib/Target/MSP430/MSP430FrameLowering.cpp
+++ llvm/lib/Target/MSP430/MSP430FrameLowering.cpp
@@ -88,18 +88,15 @@
if (NumBytes) { // adjust stack pointer: SP -= numbytes
// If there is an SUB16ri of SP immediately before this instruction, merge
// the two.
- //NumBytes -= mergeSPUpdates(MBB, MBBI, true);
// If there is an ADD16ri or SUB16ri of SP immediately after this
// instruction, merge the two instructions.
// mergeSPUpdatesDown(MBB, MBBI, &NumBytes);
- if (NumBytes) {
- MachineInstr *MI =
- BuildMI(MBB, MBBI, DL, TII.get(MSP430::SUB16ri), MSP430::SP)
- .addReg(MSP430::SP).addImm(NumBytes);
- // The SRW implicit def is dead.
- MI->getOperand(3).setIsDead();
- }
+ MachineInstr *MI =
+ BuildMI(MBB, MBBI, DL, TII.get(MSP430::SUB16ri), MSP430::SP)
+ .addReg(MSP430::SP).addImm(NumBytes);
+ // The SRW implicit def is dead.
+ MI->getOperand(3).setIsDead();
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82557.273652.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200626/a881dddc/attachment.bin>
More information about the llvm-commits
mailing list