Open jakobbotsch opened 1 year ago
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.
Author: | jakobbotsch |
---|---|
Assignees: | - |
Labels: | `area-CodeGen-coreclr`, `untriaged` |
Milestone: | - |
We should fix this; we can likely just avoid sinking these stores below the COMMAs -- this used to be necessary because block morphing did not handle the pattern, but it should be handled after https://github.com/dotnet/runtime/pull/83590.
Another thing is that, since LIR does not support TYP_STRUCT edges beyond some very restricted patterns, we should ensure that the handling for these struct operations properly handle interfering side effects.
The following logic in the importer creates unnaturally/incorrectly typed
COMMA
nodes:https://github.com/dotnet/runtime/blob/790c4c02d11b63d39fc87bec1e6a71af88293a4b/src/coreclr/jit/importer.cpp#L962-L993
It changes for instance
to
We would usually expect
[000006]
to beTYP_VOID
in the latter tree, as evidenced bygtExtractSideEffList
. Morph also has code to compensate:https://github.com/dotnet/runtime/blob/790c4c02d11b63d39fc87bec1e6a71af88293a4b/src/coreclr/jit/morph.cpp#L9665-L9669
We should fix this; we can likely just avoid sinking these stores below the COMMAs -- this used to be necessary because block morphing did not handle the pattern, but it should be handled after #83590.
91443 has an example bug because of this JIT IR oddity.