[llvm-commits] [llvm] r74886 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Dale Johannesen
dalej at apple.com
Mon Jul 6 17:18:55 PDT 2009
Author: johannes
Date: Mon Jul 6 19:18:49 2009
New Revision: 74886
URL: http://llvm.org/viewvc/llvm-project?rev=74886&view=rev
Log:
Don't accept globals as matching 'i' constraint
in PIC modes (in accordance with existing comment).
gcc.apple/asm-block-25.c
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=74886&r1=74885&r2=74886&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Jul 6 19:18:49 2009
@@ -8803,10 +8803,15 @@
continue;
}
}
-
+
// Otherwise, this isn't something we can handle, reject it.
return;
}
+ // If we require an extra load to get this address, as in PIC mode, we
+ // can't accept it.
+ if (Subtarget->GVRequiresExtraLoad(GA->getGlobal(),
+ getTargetMachine(), false))
+ return;
if (hasMemory)
Op = LowerGlobalAddress(GA->getGlobal(), Op.getDebugLoc(), Offset, DAG);
More information about the llvm-commits
mailing list