summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCombiner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCombiner.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp
index 9af7a65ca41..39adce38071 100644
--- a/llvm/lib/CodeGen/MachineCombiner.cpp
+++ b/llvm/lib/CodeGen/MachineCombiner.cpp
@@ -387,10 +387,9 @@ bool MachineCombiner::combineInstructions(MachineBasicBlock *MBB) {
} else {
// Cleanup instructions of the alternative code sequence. There is no
// use for them.
- for (auto *InstrPtr : InsInstrs) {
- MachineFunction *MF = MBB->getParent();
+ MachineFunction *MF = MBB->getParent();
+ for (auto *InstrPtr : InsInstrs)
MF->DeleteMachineInstr(InstrPtr);
- }
}
InstrIdxForVirtReg.clear();
}
OpenPOWER on IntegriCloud