aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index 092fff8..bdae761 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -1668,6 +1668,8 @@ CodeGenPatternResult(TreePatternNode *N, unsigned &Ctr,
OS << ResNo << "C = cast<ConstantSDNode>(" << Val << ")->getValue();\n";
OS << " SDOperand Tmp" << ResNo << " = CurDAG->getTargetConstant(Tmp"
<< ResNo << "C, MVT::" << getEnumName(N->getType()) << ");\n";
+ } else if (!N->isLeaf() && N->getOperator()->getName() == "tglobaladdr") {
+ OS << " SDOperand Tmp" << ResNo << " = " << Val << ";\n";
} else {
OS << " SDOperand Tmp" << ResNo << " = Select(" << Val << ");\n";
}