[llvm] r198347 - [TableGen] Handle ValueType in CodeGenDAGPatterns GetNumNodeResults
Hal Finkel
hfinkel at anl.gov
Thu Jan 2 12:47:05 PST 2014
Author: hfinkel
Date: Thu Jan 2 14:47:05 2014
New Revision: 198347
URL: http://llvm.org/viewvc/llvm-project?rev=198347&view=rev
Log:
[TableGen] Handle ValueType in CodeGenDAGPatterns GetNumNodeResults
A ValueType in a pattern dag is a type cast, and GetNumNodeResults should
handle it (the type cast has only one result).
This comes up, for example, during the type checking of pattern fragments, for
example, AArch64's Neon_combine_2d fragment is:
dag Operands = (ops node:$Rm, node:$Rn);
dag Fragment = (v2f64 (concat_vectors (v1f64 node:$Rm), (v1f64 node:$Rn)));
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=198347&r1=198346&r2=198347&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Thu Jan 2 14:47:05 2014
@@ -1116,6 +1116,9 @@ static unsigned GetNumNodeResults(Record
if (Operator->isSubClassOf("SDNodeXForm"))
return 1; // FIXME: Generalize SDNodeXForm
+ if (Operator->isSubClassOf("ValueType"))
+ return 1; // A type-cast of one result.
+
Operator->dump();
errs() << "Unhandled node in GetNumNodeResults\n";
exit(1);
More information about the llvm-commits
mailing list