Fix for a jit liveness bug.
authorEugene Rozenfeld <erozen@microsoft.com>
Fri, 26 Apr 2019 22:22:53 +0000 (15:22 -0700)
committerEugene Rozenfeld <erozen@microsoft.com>
Fri, 26 Apr 2019 22:22:53 +0000 (15:22 -0700)
commite6ee8a2c075ac906f4d86d831cac124f2f22a504
tree899ee79bd48ba4baa9289a5168d31bd8dd699e58
parente9691546d308fde4e56cc821f8c9bfda7e9a8b91
Fix for a jit liveness bug.

`fgRemoveDeadStore` has special logic for removing dead assignments
whose rhs was of type `TYP_STRUCT`:

https://github.com/dotnet/coreclr/blob/311b5e2fe413c6c74a2a3680ab54d8a978651472/src/jit/liveness.cpp#L2264-L2274

That logic was applied to "normal"
assignments (i.e., direct children of `GT_STMT`) but not to "internal"
assignments (e.g., children of `GT_COMMA`).
The test case has an internal assignment and, because this logic wasn't
applied, we ended up with a standalone `GT_IND` of type `TYP_STRUCT`
that the register allocator can't handle.

This change apples the missing logic to "internal" assignments.

Fixes #24253.
src/jit/liveness.cpp
tests/src/JIT/Regression/JitBlue/GitHub_24253/GitHub_24253.cs [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/GitHub_24253/GitHub_24253.csproj [new file with mode: 0644]