From 6dd8f10aa73f098dedb4ccf58d145a9a55665495 Mon Sep 17 00:00:00 2001 From: Pat Gavlin Date: Tue, 30 Aug 2016 16:53:40 -0700 Subject: [PATCH] Fix the srcCount for an unused GT_LONG. GT_LONG nodes that do not have a corresponding use need to consume their operands. There was already code in lowerxarch that attempted to do so, but this code was no longer valid in LIR. --- src/jit/lowerxarch.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jit/lowerxarch.cpp b/src/jit/lowerxarch.cpp index 389f9a53fe..a1e3aa32bd 100644 --- a/src/jit/lowerxarch.cpp +++ b/src/jit/lowerxarch.cpp @@ -239,9 +239,9 @@ void Lowering::TreeNodeInfoInit(GenTree* tree) #if !defined(_TARGET_64BIT_) case GT_LONG: - if (tree->gtNext == nullptr) + if ((tree->gtLIRFlags & LIR::Flags::IsUnusedValue) != 0) { - // An uncontained GT_LONG node needs to consume its source operands + // An unused GT_LONG node needs to consume its sources. info->srcCount = 2; } else @@ -249,6 +249,7 @@ void Lowering::TreeNodeInfoInit(GenTree* tree) // Passthrough info->srcCount = 0; } + info->dstCount = 0; break; -- 2.34.1