aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-12-02 16:42:25 +0000
committerJim Grosbach <grosbach@apple.com>2010-12-02 16:42:25 +0000
commit1ab4b211ea5165445b791277507d58dcf1e46688 (patch)
tree8c9ad818287434e028bf3f3b3c3e51047cd6d987 /lib
parentce4fadf884a63527942882be449d5ea75593740f (diff)
downloadexternal_llvm-1ab4b211ea5165445b791277507d58dcf1e46688.tar.gz
external_llvm-1ab4b211ea5165445b791277507d58dcf1e46688.tar.bz2
external_llvm-1ab4b211ea5165445b791277507d58dcf1e46688.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMExpandPseudoInsts.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/ARM/ARMExpandPseudoInsts.cpp b/lib/Target/ARM/ARMExpandPseudoInsts.cpp
index 1cc5bd60b9..1c02c34e82 100644
--- a/lib/Target/ARM/ARMExpandPseudoInsts.cpp
+++ b/lib/Target/ARM/ARMExpandPseudoInsts.cpp
@@ -755,13 +755,14 @@ bool ARMExpandPseudo::ExpandMBB(MachineBasicBlock &MBB) {
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);