summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-16 00:35:11 +0000
committerChris Lattner <sabre@nondot.org>2010-03-16 00:35:11 +0000
commitf57437abb148f8c30c9010668fdb0f9729f4aa6c (patch)
tree91a4dc5bb89ae7c08670781c6b038f23852388c4
parentba75e816447f4927bda39f6ab03964a02ec6fea5 (diff)
downloadbcm5719-llvm-f57437abb148f8c30c9010668fdb0f9729f4aa6c.tar.gz
bcm5719-llvm-f57437abb148f8c30c9010668fdb0f9729f4aa6c.zip
don't form a RecordChild or CheckChildType for child #'s over 7, we don't
have enums for them. llvm-svn: 98597
-rw-r--r--llvm/utils/TableGen/DAGISelMatcherOpt.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/DAGISelMatcherOpt.cpp b/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
index 910c4c5d697..820ab63c1fa 100644
--- a/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
+++ b/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
@@ -44,11 +44,13 @@ static void ContractNodes(OwningPtr<Matcher> &MatcherPtr,
if (MoveChildMatcher *MC = dyn_cast<MoveChildMatcher>(N)) {
Matcher *New = 0;
if (RecordMatcher *RM = dyn_cast<RecordMatcher>(MC->getNext()))
- New = new RecordChildMatcher(MC->getChildNo(), RM->getWhatFor(),
- RM->getResultNo());
+ if (MC->getChildNo() < 8) // Only have RecordChild0...7
+ New = new RecordChildMatcher(MC->getChildNo(), RM->getWhatFor(),
+ RM->getResultNo());
if (CheckTypeMatcher *CT= dyn_cast<CheckTypeMatcher>(MC->getNext()))
- New = new CheckChildTypeMatcher(MC->getChildNo(), CT->getType());
+ if (MC->getChildNo() < 8) // Only have CheckChildType0...7
+ New = new CheckChildTypeMatcher(MC->getChildNo(), CT->getType());
if (New) {
// Insert the new node.
OpenPOWER on IntegriCloud