diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-16 00:35:11 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-16 00:35:11 +0000 |
commit | 5f19c43161ea7c220bfdf9e958668daff55f1f23 (patch) | |
tree | b12e237b7046620c36d487c6c56679de65fa96e0 /utils | |
parent | 8d95e0be13079339c2b84f245fb1665953e2bc77 (diff) | |
download | external_llvm-5f19c43161ea7c220bfdf9e958668daff55f1f23.zip external_llvm-5f19c43161ea7c220bfdf9e958668daff55f1f23.tar.gz external_llvm-5f19c43161ea7c220bfdf9e958668daff55f1f23.tar.bz2 |
don't form a RecordChild or CheckChildType for child #'s over 7, we don't
have enums for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98597 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/DAGISelMatcherOpt.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/utils/TableGen/DAGISelMatcherOpt.cpp b/utils/TableGen/DAGISelMatcherOpt.cpp index 910c4c5..820ab63 100644 --- a/utils/TableGen/DAGISelMatcherOpt.cpp +++ b/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. |