diff options
-rw-r--r-- | support/tools/TableGen/InstrSelectorEmitter.cpp | 5 | ||||
-rw-r--r-- | utils/TableGen/InstrSelectorEmitter.cpp | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/support/tools/TableGen/InstrSelectorEmitter.cpp b/support/tools/TableGen/InstrSelectorEmitter.cpp index 4f6a018413..42d3c2207a 100644 --- a/support/tools/TableGen/InstrSelectorEmitter.cpp +++ b/support/tools/TableGen/InstrSelectorEmitter.cpp @@ -1064,8 +1064,9 @@ void InstrSelectorEmitter::run(std::ostream &OS) { << " return N->getCostFor(" << SlotName << "_Slot);\n\n" << " unsigned Cost;\n" << " switch (N->getNodeType()) {\n" - << " default: assert(0 && \"Unhandled node type for " << SlotName - << "!\");\n"; + << " default: Cost = ~0U >> 1; // Match failed\n" + << " N->setPatternCostFor(" << SlotName << "_Slot, NoMatchPattern, Cost, NumSlots);\n" + << " break;\n"; for (PatternOrganizer::NodesForSlot::iterator J = I->second.begin(), E = I->second.end(); J != E; ++J) diff --git a/utils/TableGen/InstrSelectorEmitter.cpp b/utils/TableGen/InstrSelectorEmitter.cpp index 4f6a018413..42d3c2207a 100644 --- a/utils/TableGen/InstrSelectorEmitter.cpp +++ b/utils/TableGen/InstrSelectorEmitter.cpp @@ -1064,8 +1064,9 @@ void InstrSelectorEmitter::run(std::ostream &OS) { << " return N->getCostFor(" << SlotName << "_Slot);\n\n" << " unsigned Cost;\n" << " switch (N->getNodeType()) {\n" - << " default: assert(0 && \"Unhandled node type for " << SlotName - << "!\");\n"; + << " default: Cost = ~0U >> 1; // Match failed\n" + << " N->setPatternCostFor(" << SlotName << "_Slot, NoMatchPattern, Cost, NumSlots);\n" + << " break;\n"; for (PatternOrganizer::NodesForSlot::iterator J = I->second.begin(), E = I->second.end(); J != E; ++J) |