JIT: add extra check to struct of struct of x promotion (#19156)
authorAndy Ayers <andya@microsoft.com>
Fri, 27 Jul 2018 18:09:02 +0000 (11:09 -0700)
committerGitHub <noreply@github.com>
Fri, 27 Jul 2018 18:09:02 +0000 (11:09 -0700)
commitd38774d80e07436eadc28f7255a8c9f8edb1e570
tree23e68235af36561bc241339ec451ee083aca6a8b
parent826c55f9a24926d64b042c083e09dfdf78ffe4ae
JIT: add extra check to struct of struct of x promotion (#19156)

Avoid promoting structs that contain struct fields that themselves
wrap single simple fields, if those single simple fields are smaller
than their enclosing struct.

Otherwise we run the risk of losing track of the "extra" bytes in the
innner struct.

Addresses #19149.
src/jit/lclvars.cpp
tests/src/JIT/Regression/JitBlue/GitHub_19022/GitHub_19022.cs
tests/src/JIT/Regression/JitBlue/GitHub_19149/GitHub_19149.cs [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/GitHub_19149/GitHub_19149.csproj [new file with mode: 0644]