Check that 'lvDoNotEnregister' is set as necessary. (#52802)
authorSergey Andreenko <seandree@microsoft.com>
Thu, 27 May 2021 20:20:11 +0000 (13:20 -0700)
committerGitHub <noreply@github.com>
Thu, 27 May 2021 20:20:11 +0000 (13:20 -0700)
commitedaa6d7e65ab3758088901d6758494dcd862c201
tree245c238f03231028ed78908492e9f33d4a609f4b
parent62712ec2913a9f4a1e2e7d512a4d8b0f3299709b
Check that 'lvDoNotEnregister' is set as necessary.  (#52802)

* add a repro test.

* LclVar which addresses are taken should be marked as doNotEnreg.

Check that we don't have independently promoted LCL_VAR that are references after lowering.
Check that all LclVars that have ADDR() on top of them are marked as doNotEnreg.

In the past when we did not enregister structs we were allocating them on the stack even without doNotEnreg set.
src/coreclr/jit/compiler.h
src/coreclr/jit/decomposelongs.cpp
src/coreclr/jit/lclvars.cpp
src/coreclr/jit/lower.cpp
src/coreclr/jit/morph.cpp
src/coreclr/jit/rationalize.cpp
src/tests/JIT/Regression/JitBlue/Runtime_49780/Runtime_49780.cs [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_49780/Runtime_49780.csproj [new file with mode: 0644]