[PATCH] D32888: TableGen: Add support of Intrinsics with multiple returns
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 3 03:36:17 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL321704: [TableGen] Add support of Intrinsics with multiple returns (authored by hfinkel, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D32888?vs=101160&id=128515#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32888
Files:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Index: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
===================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -2656,6 +2656,10 @@
for (unsigned i = 0, e = Dag->getNumArgs(); i != e; ++i)
Children.push_back(ParseTreePattern(Dag->getArg(i), Dag->getArgNameStr(i)));
+ // Get the actual number of results before Operator is converted to an intrinsic
+ // node (which is hard-coded to have either zero or one result).
+ unsigned NumResults = GetNumNodeResults(Operator, CDP);
+
// If the operator is an intrinsic, then this is just syntactic sugar for for
// (intrinsic_* <number>, ..children..). Pick the right intrinsic node, and
// convert the intrinsic name to a number.
@@ -2698,7 +2702,6 @@
}
}
- unsigned NumResults = GetNumNodeResults(Operator, CDP);
TreePatternNode *Result = new TreePatternNode(Operator, Children, NumResults);
Result->setName(OpName);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32888.128515.patch
Type: text/x-patch
Size: 1024 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180103/7258b16d/attachment.bin>
More information about the llvm-commits
mailing list