[llvm-commits] [llvm] r76503 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Dale Johannesen
dalej at apple.com
Mon Jul 20 16:39:13 PDT 2009
Author: johannes
Date: Mon Jul 20 18:39:13 2009
New Revision: 76503
URL: http://llvm.org/viewvc/llvm-project?rev=76503&view=rev
Log:
Make sure a global matching asm 'i' constraint gets its
flags set properly. (hasMemory is clearly irrelevant
when matching 'i', I don't understand what this was
supposed to be doing.)
gcc.apple/asm-block-25.c (test passed before by
accident, but generated code was wrong)
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=76503&r1=76502&r2=76503&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Jul 20 18:39:13 2009
@@ -4557,7 +4557,7 @@
SDValue Result;
if (OpFlags == X86II::MO_NO_FLAG && isInt32(Offset)) {
// A direct static reference to a global.
- Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), Offset);
+ Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), Offset, OpFlags);
Offset = 0;
} else {
Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), 0, OpFlags);
@@ -8911,10 +8911,7 @@
getTargetMachine())))
return;
- if (hasMemory)
- Op = LowerGlobalAddress(GV, Op.getDebugLoc(), Offset, DAG);
- else
- Op = DAG.getTargetGlobalAddress(GV, GA->getValueType(0), Offset);
+ Op = LowerGlobalAddress(GV, Op.getDebugLoc(), Offset, DAG);
Result = Op;
break;
}
More information about the llvm-commits
mailing list