[JIT] Fix - Do not remove `CAST` nodes on store if the `LCL_VAR` is a parameter or...
authorWill Smith <lol.tihan@gmail.com>
Thu, 20 Jul 2023 16:22:37 +0000 (09:22 -0700)
committerGitHub <noreply@github.com>
Thu, 20 Jul 2023 16:22:37 +0000 (09:22 -0700)
commit42322f5a9df7273509b74057457914da57a88265
tree98c425aa03f7c55326527ddd654d7716778992dd
parent2ec8a681daa2318d61627d9f3b7074a4ba4f77d1
[JIT] Fix - Do not remove `CAST` nodes on store if the `LCL_VAR` is a parameter or struct field (#85734)

* Do not remove CAST nodes on assignment if the LCL_VAR is a parameter.

* Added NormalizeOnLoad rules from SingleAccretion. Added description of why we cannot remove CAST nodes from parameters.

* Remove morph optimization for NormalizeOnLoad in fgMorphLocalVar. Update test.

* Do not OptimizeCastOnStore for params and struct fields

* Update src/coreclr/jit/morph.cpp

Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
* Formatting

---------

Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
src/coreclr/jit/compiler.h
src/coreclr/jit/morph.cpp
src/tests/JIT/Regression/JitBlue/Runtime_84693/Runtime_84693.cs
src/tests/JIT/Regression/JitBlue/Runtime_85382/Runtime_85382.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_85382/Runtime_85382.csproj [new file with mode: 0644]