From 81f4683257d9685a7c74f1517961570343b37c9c Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 14 Dec 2005 02:21:57 +0000 Subject: [PATCH] Skip over srcvalue nodes when generating ISEL code. llvm-svn: 24704 --- utils/TableGen/DAGISelEmitter.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index de74ac13a41..eca9ad11cef 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -485,7 +485,7 @@ static unsigned char getIntrinsicType(Record *R, bool NotRegisters, return MVT::Other; } else if (R->isSubClassOf("ComplexPattern")) { return TP.getDAGISelEmitter().getComplexPattern(R).getValueType(); - } else if (R->getName() == "node") { + } else if (R->getName() == "node" || R->getName() == "srcvalue") { // Placeholder. return MVT::isUnknown; } @@ -973,6 +973,10 @@ static bool HandleUse(TreePattern *I, TreePatternNode *Pat, Rec = Pat->getOperator(); } + // SRCVALUE nodes are ignored. + if (Rec->getName() == "srcvalue") + return false; + TreePatternNode *&Slot = InstInputs[Pat->getName()]; if (!Slot) { Slot = Pat; @@ -1832,6 +1836,8 @@ public: } } else if (LeafRec->isSubClassOf("ComplexPattern")) { // Handle complex pattern. Nothing to do here. + } else if (LeafRec->getName() == "srcvalue") { + // Place holder for SRCVALUE nodes. Nothing to do here. } else if (LeafRec->isSubClassOf("ValueType")) { // Make sure this is the specified value type. OS << " if (cast(" << RootName << OpNo << ")->getVT() != "