summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-03-09 03:01:40 +0000
committerDan Gohman <gohman@apple.com>2010-03-09 03:01:40 +0000
commit772952f46e7d69397cbf56a5e66acf509102cf21 (patch)
treef9994fa06017eb9d89e95321af4d70af923e4460 /llvm/lib
parent46ffefc66ce5de50708898771d403ec541a958f1 (diff)
downloadbcm5719-llvm-772952f46e7d69397cbf56a5e66acf509102cf21.tar.gz
bcm5719-llvm-772952f46e7d69397cbf56a5e66acf509102cf21.zip
Don't try to fold V_SET0 and V_SETALLONES to loads in medium and
large code models. llvm-svn: 98042
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86InstrInfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp
index 39bda04b4d1..4fd91bbc2fd 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.cpp
+++ b/llvm/lib/Target/X86/X86InstrInfo.cpp
@@ -2525,6 +2525,11 @@ MachineInstr* X86InstrInfo::foldMemoryOperandImpl(MachineFunction &MF,
// Folding a V_SET0 or V_SETALLONES as a load, to ease register pressure.
// Create a constant-pool entry and operands to load from it.
+ // Medium and large mode can't fold loads this way.
+ if (TM.getCodeModel() != CodeModel::Small &&
+ TM.getCodeModel() != CodeModel::Kernel)
+ return NULL;
+
// x86-32 PIC requires a PIC base register for constant pools.
unsigned PICBase = 0;
if (TM.getRelocationModel() == Reloc::PIC_) {
OpenPOWER on IntegriCloud