Make sure to pass the offset into the new node, so that we don't silently
drop it on the floor.
llvm-svn: 25044
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index b510f1c..853b48c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -511,7 +511,7 @@
MVT::ValueType VT, int offset) {
SDNode *&N = GlobalValues[std::make_pair(GV, offset)];
if (N) return SDOperand(N, 0);
- N = new GlobalAddressSDNode(false, GV, VT);
+ N = new GlobalAddressSDNode(false, GV, VT, offset);
AllNodes.push_back(N);
return SDOperand(N, 0);
}