From e61fb9c959d6703dbcc5ac919470f0c37ee01109 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 7 Aug 2009 19:34:35 +0000 Subject: [PATCH] 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 --- lib/Target/ARM/README-Thumb2.txt | 2 -- lib/Target/ARM/Thumb2InstrInfo.cpp | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/Target/ARM/README-Thumb2.txt b/lib/Target/ARM/README-Thumb2.txt index 48b5278122..6a51e7ce82 100644 --- a/lib/Target/ARM/README-Thumb2.txt +++ b/lib/Target/ARM/README-Thumb2.txt @@ -3,5 +3,3 @@ //===---------------------------------------------------------------------===// We should be using ADD / SUB rd, sp, rm instructions. - -copyRegToReg should use tMOVgpr2gpr instead of t2MOVr? diff --git a/lib/Target/ARM/Thumb2InstrInfo.cpp b/lib/Target/ARM/Thumb2InstrInfo.cpp index 2b329e03db..783e65053b 100644 --- a/lib/Target/ARM/Thumb2InstrInfo.cpp +++ b/lib/Target/ARM/Thumb2InstrInfo.cpp @@ -65,12 +65,7 @@ Thumb2InstrInfo::copyRegToReg(MachineBasicBlock &MBB, if (DestRC == ARM::GPRRegisterClass && SrcRC == ARM::GPRRegisterClass) { - // FIXME: Just use tMOVgpr2gpr since it's shorter? - 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))); + BuildMI(MBB, I, DL, get(ARM::tMOVgpr2gpr), DestReg).addReg(SrcReg); return true; } else if (DestRC == ARM::GPRRegisterClass && SrcRC == ARM::tGPRRegisterClass) { -- 2.11.4.GIT