when a match fails and we have to rollback, make sure to keep 'N' in
authorChris Lattner <sabre@nondot.org>
Sun, 21 Feb 2010 07:55:48 +0000 (07:55 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 21 Feb 2010 07:55:48 +0000 (07:55 +0000)
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

include/llvm/CodeGen/DAGISelHeader.h

index 1e808ed217dc0a40decee0f28c4a5e0dedd09ee7..42583ec18b102ba462c401dc73d8d0ff46d9662e 100644 (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);