From: Eric Christopher Date: Mon, 23 Aug 2010 23:28:04 +0000 (+0000) Subject: Don't need the extra register here. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1dfb4d31e068855c594d157d5a9a207daf473426;p=oota-llvm.git Don't need the extra register here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111864 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index e08433925f3..5a8fa9aa633 100644 --- a/lib/Target/ARM/ARMFastISel.cpp +++ b/lib/Target/ARM/ARMFastISel.cpp @@ -370,23 +370,21 @@ bool ARMFastISel::ARMSelectLoad(const Instruction *I) { // Since the offset may be too large for the load instruction // get the reg+offset into a register. // TODO: Optimize this somewhat. - // FIXME: There is more than one register class in the world... - unsigned ScratchReg - = FuncInfo.MF->getRegInfo().createVirtualRegister(ARM::GPRRegisterClass); ARMCC::CondCodes Pred = ARMCC::AL; unsigned PredReg = 0; if (!AFI->isThumbFunction()) emitARMRegPlusImmediate(*FuncInfo.MBB, FuncInfo.InsertPt, DL, - ScratchReg, Reg, Offset, Pred, PredReg, + Reg, Reg, Offset, Pred, PredReg, static_cast(TII)); else { assert(AFI->isThumb2Function()); emitT2RegPlusImmediate(*FuncInfo.MBB, FuncInfo.InsertPt, DL, - ScratchReg, Reg, Offset, Pred, PredReg, + Reg, Reg, Offset, Pred, PredReg, static_cast(TII)); } - + + // FIXME: There is more than one register class in the world... unsigned ResultReg = createResultReg(ARM::GPRRegisterClass); AddOptionalDefs(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(ARM::LDR), ResultReg)