aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-07-21 00:12:29 +0000
committerDale Johannesen <dalej@apple.com>2009-07-21 00:12:29 +0000
commit60b3ba0472c8b764cbfac173446438b682d5093f (patch)
tree6bb406737c7ede187799bc42e3e11dd2ccb0c1ad
parentf117ed462c17bcebe7a0f420885e2d7d55465912 (diff)
revert 76503 while I figure out what's going on
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76517 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index 7ce51b323c..c20a626658 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -4557,7 +4557,7 @@ X86TargetLowering::LowerGlobalAddress(const GlobalValue *GV, DebugLoc dl,
SDValue Result;
if (OpFlags == X86II::MO_NO_FLAG && isInt32(Offset)) {
// A direct static reference to a global.
- Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), Offset, OpFlags);
+ Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), Offset);
Offset = 0;
} else {
Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), 0, OpFlags);
@@ -8911,7 +8911,10 @@ void X86TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
getTargetMachine())))
return;
- Op = LowerGlobalAddress(GV, Op.getDebugLoc(), Offset, DAG);
+ if (hasMemory)
+ Op = LowerGlobalAddress(GV, Op.getDebugLoc(), Offset, DAG);
+ else
+ Op = DAG.getTargetGlobalAddress(GV, GA->getValueType(0), Offset);
Result = Op;
break;
}