Enable PIC codegen on x86-64/linux

llvm-svn: 46198
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp
index 6efe540..1480332 100644
--- a/llvm/lib/Target/X86/X86Subtarget.cpp
+++ b/llvm/lib/Target/X86/X86Subtarget.cpp
@@ -41,7 +41,7 @@
       return (!isDirectCall &&
               (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
                (GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode())));
-    } else if (TM.getRelocationModel() == Reloc::PIC_ && isPICStyleGOT()) {
+    } else if (isTargetELF()) {
       // Extra load is needed for all non-statics.
       return (!isDirectCall &&
               (GV->isDeclaration() || !GV->hasInternalLinkage()));