Fix for PR1062 by Dan Gohman.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2006-12-19 21:31:42 +00:00
parent ecb2768758
commit a70d14bd16

View File

@ -604,11 +604,9 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM,
SDOperand N0 = N.getOperand(0);
if (GlobalAddressSDNode *G = dyn_cast<GlobalAddressSDNode>(N0)) {
GlobalValue *GV = G->getGlobal();
bool isAbs32 = !is64Bit ||
(isStatic && !(GV->isExternal() || GV->hasWeakLinkage() ||
GV->hasLinkOnceLinkage()));
bool isAbs32 = !is64Bit || isStatic;
if (isAbs32 || isRoot) {
AM.GV = G->getGlobal();
AM.GV = GV;
AM.Disp += G->getOffset();
AM.isRIPRel = !isAbs32;
return false;