Delete the instruction just before the function terminates for consistency sake.

llvm-svn: 91836
This commit is contained in:
Evan Cheng 2009-12-21 19:53:39 +00:00
parent 6de55a0efd
commit db4d798619
1 changed files with 3 additions and 2 deletions

View File

@ -3148,8 +3148,6 @@ ARMTargetLowering::EmitAtomicBinary(MachineInstr *MI, MachineBasicBlock *BB,
unsigned incr = MI->getOperand(2).getReg(); unsigned incr = MI->getOperand(2).getReg();
DebugLoc dl = MI->getDebugLoc(); DebugLoc dl = MI->getDebugLoc();
F->DeleteMachineInstr(MI); // The instruction is gone now.
bool isThumb2 = Subtarget->isThumb2(); bool isThumb2 = Subtarget->isThumb2();
unsigned ldrOpc, strOpc; unsigned ldrOpc, strOpc;
switch (Size) { switch (Size) {
@ -3216,6 +3214,9 @@ ARMTargetLowering::EmitAtomicBinary(MachineInstr *MI, MachineBasicBlock *BB,
// exitMBB: // exitMBB:
// ... // ...
BB = exitMBB; BB = exitMBB;
F->DeleteMachineInstr(MI); // The instruction is gone now.
return BB; return BB;
} }