diff options
author | Tanya Lattner <tonic@nondot.org> | 2010-03-11 23:41:22 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2010-03-11 23:41:22 +0000 |
commit | dfbd083efb3c04c5523f6c5b7277e2f67f998c12 (patch) | |
tree | b9b98c5af4f9e19a7abcec9ec7ab9bd4488acee8 | |
parent | 7c278626905fa40b36b457bd00996f11b02adc24 (diff) | |
download | llvm-dfbd083efb3c04c5523f6c5b7277e2f67f998c12.tar.gz |
Merge 98042.
Don't try to fold V_SET0 and V_SETALLONES to loads in medium and
large code models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98301 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86InstrInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrInfo.cpp b/lib/Target/X86/X86InstrInfo.cpp index 39bda04b4d13..4fd91bbc2fd8 100644 --- a/lib/Target/X86/X86InstrInfo.cpp +++ b/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_) { |