Given the issues with dotnet/corefx#20025, dotnet/runtime#8185, and dotnet/runtime#8195, which were triggered by dotnet/coreclr#10453 even though it passed normal core and desktop testing, it may well be a good idea to add a stress mode to try to flush out such bugs. The stress mode would short-circuit this check so it never decides to undo a promotion.
Going further, short-circuiting lvaShouldPromoteStructVar to always return true as part of struct promotion stress mode could help flush out more issues.
Given the issues with dotnet/corefx#20025, dotnet/runtime#8185, and dotnet/runtime#8195, which were triggered by dotnet/coreclr#10453 even though it passed normal core and desktop testing, it may well be a good idea to add a stress mode to try to flush out such bugs. The stress mode would short-circuit this check so it never decides to undo a promotion.
Going further, short-circuiting
lvaShouldPromoteStructVar
to always return true as part of struct promotion stress mode could help flush out more issues.category:correctness theme:structs skill-level:intermediate cost:medium impact:small