diff options
author | Eric Christopher <echristo@gmail.com> | 2014-05-22 01:46:02 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-05-22 01:46:02 +0000 |
commit | 0d5c99eb0843273f1e7e2628a52881b7e851fd98 (patch) | |
tree | 39db18752176e7f713d904493a7ca2444c3c8ca8 /llvm/lib/Target/X86/X86InstrInfo.cpp | |
parent | e0bd2fa9276500c4aef7d279c28ce3ff54229842 (diff) | |
download | bcm5719-llvm-0d5c99eb0843273f1e7e2628a52881b7e851fd98.tar.gz bcm5719-llvm-0d5c99eb0843273f1e7e2628a52881b7e851fd98.zip |
Avoid using subtarget features when adding X86 specific passes to
the pass pipeline.
llvm-svn: 209382
Diffstat (limited to 'llvm/lib/Target/X86/X86InstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86InstrInfo.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 8edce9fd462..6993577d19c 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -5395,8 +5395,10 @@ namespace { const X86TargetMachine *TM = static_cast<const X86TargetMachine *>(&MF.getTarget()); - assert(!TM->getSubtarget<X86Subtarget>().is64Bit() && - "X86-64 PIC uses RIP relative addressing"); + // Don't do anything if this is 64-bit as 64-bit PIC + // uses RIP relative addressing. + if (TM->getSubtarget<X86Subtarget>().is64Bit()) + return false; // Only emit a global base reg in PIC mode. if (TM->getRelocationModel() != Reloc::PIC_) |