From 49f1c2a73395439eadf5e04631c1b750f9fd31ca Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Thu, 2 Jan 2014 20:47:05 +0000 Subject: [PATCH] [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))); llvm-svn: 198347 --- llvm/utils/TableGen/CodeGenDAGPatterns.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp index 717090a..6941732a 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp @@ -1116,6 +1116,9 @@ static unsigned GetNumNodeResults(Record *Operator, CodeGenDAGPatterns &CDP) { 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); -- 2.7.4