From 75975e2a29eac9a9e414739049a6b9cf50dc4ff9 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Sat, 13 Jun 2015 15:33:15 +0000 Subject: [PATCH] hoist loop-invariant; NFCI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239681 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineCombiner.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/MachineCombiner.cpp b/lib/CodeGen/MachineCombiner.cpp index 9af7a65ca41..39adce38071 100644 --- a/lib/CodeGen/MachineCombiner.cpp +++ b/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(); }