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.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6dd8f10aa73f098dedb4ccf58d145a9a55665495
#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
// Passthrough
info->srcCount = 0;
}
+
info->dstCount = 0;
break;