aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-01-20 23:55:07 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-01-20 23:55:07 +0000
commitd7e3cc840b81b0438e47f05d9664137a198876df (patch)
treee43d687614462ad01654f0ef2013aa9c2bc9938f /lib/Target/ARM
parente906921480beacea2dea2d5ce8156bc246ee12a7 (diff)
downloadexternal_llvm-d7e3cc840b81b0438e47f05d9664137a198876df.zip
external_llvm-d7e3cc840b81b0438e47f05d9664137a198876df.tar.gz
external_llvm-d7e3cc840b81b0438e47f05d9664137a198876df.tar.bz2
Don't be overly aggressive with CSE of "ldr constantpool". If it's a pc-relative
value, the "add pc" must be CSE'ed at the same time. We could follow the same approach as T2 by adding pseudo instructions that combine the ldr + "add pc". But the better approach is to use movw + movt (which I will enable soon), so I'll leave this as a TODO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r--lib/Target/ARM/ARMBaseInstrInfo.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp
index ef7458d..aaf4f0d 100644
--- a/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -1055,8 +1055,7 @@ bool ARMBaseInstrInfo::produceSameValue(const MachineInstr *MI0,
const MachineInstr *MI1,
const MachineRegisterInfo *MRI) const {
int Opcode = MI0->getOpcode();
- if (Opcode == ARM::LDRi12 ||
- Opcode == ARM::t2LDRpci ||
+ if (Opcode == ARM::t2LDRpci ||
Opcode == ARM::t2LDRpci_pic ||
Opcode == ARM::tLDRpci ||
Opcode == ARM::tLDRpci_pic ||
@@ -1069,9 +1068,6 @@ bool ARMBaseInstrInfo::produceSameValue(const MachineInstr *MI0,
const MachineOperand &MO0 = MI0->getOperand(1);
const MachineOperand &MO1 = MI1->getOperand(1);
- if (Opcode == ARM::LDRi12 && (!MO0.isCPI() || !MO1.isCPI()))
- return false;
-
if (MO0.getOffset() != MO1.getOffset())
return false;