when a match fails and we have to rollback, make sure to keep 'N' in

sync with the top of stack.  This fixes a bunch of failures on larger
testcases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96732 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2010-02-21 07:55:48 +00:00
parent 0fb65cffa6
commit 863cc971e8

View File

@ -760,6 +760,7 @@ SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
const MatchScope &LastScope = MatchScopes.back();
RecordedNodes.resize(LastScope.NumRecordedNodes);
NodeStack.resize(LastScope.NodeStackSize);
N = NodeStack.back();
if (LastScope.NumMatchedMemRefs != MatchedMemRefs.size())
MatchedMemRefs.resize(LastScope.NumMatchedMemRefs);