From c1a5cfa9a024ed14f418e1d7c660ba96fd34d6b5 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Sat, 25 Jul 2009 01:25:08 +0000 Subject: [PATCH] Get rid of a couple of unnecessary getOpcode calls. llvm-svn: 77035 --- llvm/lib/Target/ARM/Thumb2InstrInfo.cpp | 2 +- llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp b/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp index 4d442c0d54d6..d74e485d08be 100644 --- a/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp +++ b/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp @@ -88,7 +88,7 @@ Thumb2InstrInfo::copyRegToReg(MachineBasicBlock &MBB, SrcRC == ARM::tGPRRegisterClass) || (DestRC == ARM::tGPRRegisterClass && SrcRC == ARM::GPRRegisterClass)) { - AddDefaultCC(AddDefaultPred(BuildMI(MBB, I, DL, get(getOpcode(ARMII::MOVr)), + AddDefaultCC(AddDefaultPred(BuildMI(MBB, I, DL, get(ARM::t2MOVr), DestReg).addReg(SrcReg))); return true; } diff --git a/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp b/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp index 106bc256dfd3..ce495fae1cbb 100644 --- a/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp +++ b/llvm/lib/Target/ARM/Thumb2RegisterInfo.cpp @@ -180,7 +180,7 @@ rewriteFrameIndex(MachineInstr &MI, unsigned FrameRegIdx, Offset += MI.getOperand(FrameRegIdx+1).getImm(); if (Offset == 0) { // Turn it into a move. - MI.setDesc(TII.get(getOpcode(ARMII::MOVr))); + MI.setDesc(TII.get(ARM::t2MOVr)); MI.getOperand(FrameRegIdx).ChangeToRegister(FrameReg, false); MI.RemoveOperand(FrameRegIdx+1); return 0;