Print the correct index in the "match failed at index" message.
authorDan Gohman <gohman@apple.com>
Tue, 9 Mar 2010 00:07:36 +0000 (00:07 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 9 Mar 2010 00:07:36 +0000 (00:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98013 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

index 05f9f1ff18603855f0dbd0fc35660ab3b4936595..32fdd30ac8a94d8e355908725d9158f7bbcb188d 100644 (file)
@@ -2680,7 +2680,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
       NodeStack.append(LastScope.NodeStack.begin(), LastScope.NodeStack.end());
       N = NodeStack.back();
 
-      DEBUG(errs() << "  Match failed at index " << MatcherIndex
+      DEBUG(errs() << "  Match failed at index " << (MatcherIndex-1)
                    << " continuing at " << LastScope.FailIndex << "\n");
     
       if (LastScope.NumMatchedMemRefs != MatchedMemRefs.size())