Use 16-bit tMOVgpr2gpr instead of tMOVr to copy GPR registers in Thumb2 mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2009-08-07 19:34:35 +00:00
parent 1d2426c470
commit e118cb6146
2 changed files with 1 additions and 8 deletions

View File

@ -3,5 +3,3 @@
//===---------------------------------------------------------------------===// //===---------------------------------------------------------------------===//
We should be using ADD / SUB rd, sp, rm <shift> instructions. We should be using ADD / SUB rd, sp, rm <shift> instructions.
copyRegToReg should use tMOVgpr2gpr instead of t2MOVr?

View File

@ -65,12 +65,7 @@ Thumb2InstrInfo::copyRegToReg(MachineBasicBlock &MBB,
if (DestRC == ARM::GPRRegisterClass && if (DestRC == ARM::GPRRegisterClass &&
SrcRC == ARM::GPRRegisterClass) { SrcRC == ARM::GPRRegisterClass) {
// FIXME: Just use tMOVgpr2gpr since it's shorter? BuildMI(MBB, I, DL, get(ARM::tMOVgpr2gpr), DestReg).addReg(SrcReg);
if (SrcReg == ARM::SP || DestReg == ARM::SP)
BuildMI(MBB, I, DL, get(ARM::tMOVgpr2gpr), DestReg).addReg(SrcReg);
else
AddDefaultCC(AddDefaultPred(BuildMI(MBB, I, DL, get(ARM::t2MOVr),
DestReg).addReg(SrcReg)));
return true; return true;
} else if (DestRC == ARM::GPRRegisterClass && } else if (DestRC == ARM::GPRRegisterClass &&
SrcRC == ARM::tGPRRegisterClass) { SrcRC == ARM::tGPRRegisterClass) {