JIT: Fix block morphing/physical promotion self-interference (#85887)
authorJakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Tue, 9 May 2023 07:27:03 +0000 (09:27 +0200)
committerGitHub <noreply@github.com>
Tue, 9 May 2023 07:27:03 +0000 (09:27 +0200)
commitaaa1de18a7f97774fd44a1728dafc0d86894800e
tree0c9d2aca0e336e404be5036e9ca008055a325af7
parent547c506abe05e510bd43330fc8f6d4c5961e9223
JIT: Fix block morphing/physical promotion self-interference (#85887)

Fix a couple of cases where it's possible that the decomposed stores
will modify the address being used as part of the operation too early.
In those cases we must spill the address to a new local ahead of time.

Fix #85874
src/coreclr/jit/morphblock.cpp
src/coreclr/jit/promotiondecomposition.cpp
src/tests/JIT/Directed/physicalpromotion/addressinterference.cs [new file with mode: 0644]
src/tests/JIT/Directed/physicalpromotion/addressinterference.csproj [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_85874/Runtime_85874.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_85874/Runtime_85874.csproj [new file with mode: 0644]