forked from OSchip/llvm-project
teach tblgen to be smart enough to handle tglobaladdr nodes
llvm-svn: 24391
This commit is contained in:
parent
595088aa0f
commit
2a230e1c1a
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue