From: Evan Cheng Date: Mon, 8 Dec 2008 19:29:03 +0000 (+0000) Subject: Re-apply 60689 now my head is screwed on right. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e4d1082b2c63919f3abb6de18ce47ce9e05cfdea;p=oota-llvm.git Re-apply 60689 now my head is screwed on right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60711 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index 583fe8a0fbe..2924d33a3b7 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -40,6 +40,8 @@ bool X86Subtarget::GVRequiresExtraLoad(const GlobalValue* GV, if (TM.getRelocationModel() != Reloc::Static && TM.getCodeModel() != CodeModel::Large) { if (isTargetDarwin()) { + if (isDirectCall) + return false; bool isDecl = GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode(); if (GV->hasHiddenVisibility() && (Is64Bit || (!isDecl && !GV->hasCommonLinkage())))