[llvm-commits] [llvm] r120711 - /llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
Jim Grosbach
grosbach at apple.com
Thu Dec 2 08:42:25 PST 2010
Author: grosbach
Date: Thu Dec 2 10:42:25 2010
New Revision: 120711
URL: http://llvm.org/viewvc/llvm-project?rev=120711&view=rev
Log:
When expanding the MOVCCi32imm, make sure to use the ARM movt/movw opcodes,
not thumb2.
Modified:
llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp?rev=120711&r1=120710&r2=120711&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMExpandPseudoInsts.cpp Thu Dec 2 10:42:25 2010
@@ -755,13 +755,14 @@
break;
}
+ bool isThumb =
+ (Opcode == ARM::t2MOVi32imm || Opcode == ARM::t2MOVCCi32imm);
+
LO16 = BuildMI(MBB, MBBI, MI.getDebugLoc(),
- TII->get(Opcode == ARM::MOVi32imm ?
- ARM::MOVi16 : ARM::t2MOVi16),
+ TII->get(isThumb ? ARM::t2MOVi16 : ARM::MOVi16),
DstReg);
HI16 = BuildMI(MBB, MBBI, MI.getDebugLoc(),
- TII->get(Opcode == ARM::MOVi32imm ?
- ARM::MOVTi16 : ARM::t2MOVTi16))
+ TII->get(isThumb ? ARM::t2MOVTi16 : ARM::MOVTi16))
.addReg(DstReg, RegState::Define | getDeadRegState(DstIsDead))
.addReg(DstReg);
More information about the llvm-commits
mailing list