[release/8.0] JIT: Handle mistyped commas in morph in pre-order too (#91718)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Mon, 11 Sep 2023 14:45:57 +0000 (07:45 -0700)
committerGitHub <noreply@github.com>
Mon, 11 Sep 2023 14:45:57 +0000 (07:45 -0700)
commitdbec2046adc49de5970af5a4482e68c06c4f39d2
tree080b8cb66b17d9fd2b4ab88a5b50c4f0ea06b5dc
parent1ce9687c01aa45348ba72853676d1e05178f372b
[release/8.0] JIT: Handle mistyped commas in morph in pre-order too (#91718)

* JIT: Compensate for mistyped commas in morph pre-order too

Morph has post-order logic to compensate for mistyped commas produced by
impStoreStruct. However, block morphing can optimize unused stores into
INDs; this interacts with the mistyped commas to produce illegal IR
shapes (e.g. `COMMA<simd12>(..., IND<ubyte>(...))`).

The ideal solution is to fix impStoreStruct (#91586 tracks this), but
this change has a more surgical fix for the problem that can be
backported to .NET 8.

Fix #91443

* Fix build

---------

Co-authored-by: Jakob Botsch Nielsen <jakob.botsch.nielsen@gmail.com>
Co-authored-by: Jeff Schwartz <jeffschw@microsoft.com>
src/coreclr/jit/morph.cpp
src/tests/JIT/Regression/JitBlue/Runtime_91443/Runtime_91443.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_91443/Runtime_91443.csproj [new file with mode: 0644]