From: Bill Wendling Date: Wed, 18 Aug 2010 21:32:07 +0000 (+0000) Subject: Minor simplification. Gets rid of a needless temporary. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ad422718f9b3224234f52e84d28d8a57a4e89987;p=oota-llvm.git Minor simplification. Gets rid of a needless temporary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111430 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index 7e166d52737..7609494d7b2 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -1403,14 +1403,13 @@ ConvertToSetZeroFlag(MachineInstr *MI, MachineInstr *CmpInstr) const { case ARM::ADDri: case ARM::SUBri: case ARM::t2ADDri: - case ARM::t2SUBri: { + case ARM::t2SUBri: MI->RemoveOperand(5); - MachineInstrBuilder MB(MI); - MB.addReg(ARM::CPSR, RegState::Define | RegState::Implicit); + MachineInstrBuilder(MI) + .addReg(ARM::CPSR, RegState::Define | RegState::Implicit); CmpInstr->eraseFromParent(); return true; } - } return false; }