1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

teach tblgen to be smart enough to handle tglobaladdr nodes

llvm-svn: 24391
This commit is contained in:
Chris Lattner 2005-11-17 07:39:45 +00:00
parent 8d04987a39
commit 464f4402cf

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