Expand the GC hole fix for explicitly initialized structs (#69501)
authorSingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Wed, 18 May 2022 20:40:46 +0000 (23:40 +0300)
committerGitHub <noreply@github.com>
Wed, 18 May 2022 20:40:46 +0000 (13:40 -0700)
commitfbef29b711d94258ea872e15309366c369e36630
tree2711a482e2c12625ff9450cb935ccf4a85ace755
parent1d1df64551d2d59c53294a9957512032c076cdfc
Expand the GC hole fix for explicitly initialized structs (#69501)

* Expand the fix for explicitly initialized structs

Liveness code already recognizes that it cannot delete certain local
stores with the implicit side effect of "explicit initialization".

However, it was only doing that for indirect "InitBlk" forms, while
the store can have more or less arbitrary shape (the only requirement
is that is must be "entire").

Fix this by not constraining the check to "InitBlk"s.

* Add a test
src/coreclr/jit/compiler.h
src/coreclr/jit/gentree.h
src/coreclr/jit/liveness.cpp
src/tests/JIT/Regression/JitBlue/Runtime_65694/Runtime_65694_2.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_65694/Runtime_65694_2.csproj [new file with mode: 0644]