summaryrefslogtreecommitdiff
path: root/src/jit/codegenlinear.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jit/codegenlinear.cpp')
-rw-r--r--src/jit/codegenlinear.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jit/codegenlinear.cpp b/src/jit/codegenlinear.cpp
index c8fcd88c10..afc7db3c46 100644
--- a/src/jit/codegenlinear.cpp
+++ b/src/jit/codegenlinear.cpp
@@ -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);
@@ -1224,7 +1228,7 @@ void CodeGen::genConsumeRegs(GenTree* tree)
genConsumeAddress(tree->AsIndir()->Addr());
}
#ifdef _TARGET_XARCH_
- else if (tree->OperGet() == GT_LCL_VAR)
+ else if (tree->OperIsLocalRead())
{
// A contained lcl var must be living on stack and marked as reg optional, or not be a
// register candidate.