aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-02-25 09:55:19 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-02-25 09:55:19 +0000
commitbbbb2fbbde673d2e23b83722510c03bc8c67c70a (patch)
treeefc4aee6e586f18761fdfb89c82bf2198f56a729 /lib
parent404cb4f9fa2df50eac4d84b8a77c84a92188c6d5 (diff)
Added a common about the need for X86ISD::Wrapper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86ISelLowering.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp
index e2f22ae0a3..48e049c617 100644
--- a/lib/Target/X86/X86ISelLowering.cpp
+++ b/lib/Target/X86/X86ISelLowering.cpp
@@ -1829,6 +1829,13 @@ SDOperand X86TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
return DAG.getNode(X86ISD::REP_MOVS, MVT::Other, Chain,
DAG.getValueType(AVT), InFlag);
}
+
+ // ConstantPool, GlobalAddress, and ExternalSymbol are lowered as their
+ // target countpart wrapped in the X86ISD::Wrapper node. Suppose N is
+ // one of the above mentioned nodes. It has to be wrapped because otherwise
+ // Select(N) returns N. So the raw TargetGlobalAddress nodes, etc. can only
+ // be used to form addressing mode. These wrapped nodes will be selected
+ // into MOV32ri.
case ISD::ConstantPool: {
ConstantPoolSDNode *CP = cast<ConstantPoolSDNode>(Op);
SDOperand Result = DAG.getNode(X86ISD::Wrapper, getPointerTy(),