mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
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:
parent
ecb2768758
commit
a70d14bd16
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user