From 102ebf16b6eb46e3021b9e8db8a1bc163bc64639 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 21 Dec 2009 19:53:39 +0000 Subject: [PATCH] Delete the instruction just before the function terminates for consistency sake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91836 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMISelLowering.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp index e969d1e3415..04ea541b395 100644 --- a/lib/Target/ARM/ARMISelLowering.cpp +++ b/lib/Target/ARM/ARMISelLowering.cpp @@ -3148,8 +3148,6 @@ ARMTargetLowering::EmitAtomicBinary(MachineInstr *MI, MachineBasicBlock *BB, unsigned incr = MI->getOperand(2).getReg(); DebugLoc dl = MI->getDebugLoc(); - F->DeleteMachineInstr(MI); // The instruction is gone now. - bool isThumb2 = Subtarget->isThumb2(); unsigned ldrOpc, strOpc; switch (Size) { @@ -3216,6 +3214,9 @@ ARMTargetLowering::EmitAtomicBinary(MachineInstr *MI, MachineBasicBlock *BB, // exitMBB: // ... BB = exitMBB; + + F->DeleteMachineInstr(MI); // The instruction is gone now. + return BB; }