When expanding the MOVCCi32imm, make sure to use the ARM movt/movw opcodes,

not thumb2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach 2010-12-02 16:42:25 +00:00
parent ce4fadf884
commit 1ab4b211ea

View File

@ -755,13 +755,14 @@ bool ARMExpandPseudo::ExpandMBB(MachineBasicBlock &MBB) {
break; break;
} }
bool isThumb =
(Opcode == ARM::t2MOVi32imm || Opcode == ARM::t2MOVCCi32imm);
LO16 = BuildMI(MBB, MBBI, MI.getDebugLoc(), LO16 = BuildMI(MBB, MBBI, MI.getDebugLoc(),
TII->get(Opcode == ARM::MOVi32imm ? TII->get(isThumb ? ARM::t2MOVi16 : ARM::MOVi16),
ARM::MOVi16 : ARM::t2MOVi16),
DstReg); DstReg);
HI16 = BuildMI(MBB, MBBI, MI.getDebugLoc(), HI16 = BuildMI(MBB, MBBI, MI.getDebugLoc(),
TII->get(Opcode == ARM::MOVi32imm ? TII->get(isThumb ? ARM::t2MOVTi16 : ARM::MOVTi16))
ARM::MOVTi16 : ARM::t2MOVTi16))
.addReg(DstReg, RegState::Define | getDeadRegState(DstIsDead)) .addReg(DstReg, RegState::Define | getDeadRegState(DstIsDead))
.addReg(DstReg); .addReg(DstReg);