Do not report out-of-order consuming if node wasn't consumed at all
authorMikhail Skvortcov <m.skvortcov@partner.samsung.com>
Thu, 27 Apr 2017 14:53:53 +0000 (17:53 +0300)
committerMikhail Skvortcov <m.skvortcov@partner.samsung.com>
Thu, 27 Apr 2017 14:53:53 +0000 (17:53 +0300)
Commit migrated from https://github.com/dotnet/coreclr/commit/c3bb00cd7baebf787c1722c5fc99ca1aea28c4ea

src/coreclr/src/jit/codegenlinear.cpp

index c8fcd88..b0fb36f 100644 (file)
@@ -1087,7 +1087,11 @@ void CodeGen::genCheckConsumeNode(GenTree* const node)
 
     if (verbose)
     {
-        if ((node->gtDebugFlags & GTF_DEBUG_NODE_CG_CONSUMED) != 0)
+        if (node->gtUseNum == -1)
+        {
+            // nothing wrong if the node was not consumed
+        }
+        else if ((node->gtDebugFlags & GTF_DEBUG_NODE_CG_CONSUMED) != 0)
         {
             printf("Node was consumed twice:\n");
             compiler->gtDispTree(node, nullptr, nullptr, true);