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

Node arguments to type casts can have names too. This code

needs to be majorly refactored, but this spot bugfix allows
things like:

 def vmrghw_shuffle : PatFrag<(ops node:$lhs, node:$rhs),
                             (vector_shuffle (v4i32 node:$lhs), node:$rhs), [{
...

llvm-svn: 97952
This commit is contained in:
Chris Lattner 2010-03-08 18:36:19 +00:00
parent 27862700e5
commit b5555f19f1

View File

@ -1238,6 +1238,14 @@ TreePatternNode *TreePattern::ParseTreePattern(DagInit *Dag) {
std::vector<std::pair<Init*, std::string> >()));
return ParseTreePattern(Dag);
}
// Input argument?
if (R->getName() == "node") {
if (Dag->getArgName(0).empty())
error("'node' argument requires a name to match with operand list");
Args.push_back(Dag->getArgName(0));
}
New = new TreePatternNode(DI);
} else if (DagInit *DI = dynamic_cast<DagInit*>(Arg)) {
New = ParseTreePattern(DI);