teach tblgen to be smart enough to handle tglobaladdr nodes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24391 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-11-17 07:39:45 +00:00
parent 860e8862c1
commit b120a64e13

View File

@ -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";
}