This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Description
Found when I was running the tests Tanner added in dotnet/coreclr#15961 (while half of the tests focuses on Vector64/128/256, the second half is a general purpose test and we're failing computing the right sizes).
I have a fix that is halfway there in MichalStrehovsky@7f94460.
What it lacks is handling of Align8 and unit tests.
For the record, here's the relevant part of the output of Tanner's test:
Unexpected Size for AutoLayoutMinPacking`1[System.Char].
Expected: 4; Actual: 3
Unexpected Size for AutoLayoutMinPacking`1[System.Double].
Expected: 16; Actual: 9
Unexpected Size for AutoLayoutMinPacking`1[System.Int16].
Expected: 4; Actual: 3
Unexpected Size for AutoLayoutMinPacking`1[System.Int32].
Expected: 8; Actual: 5
Unexpected Size for AutoLayoutMinPacking`1[System.Int64].
Expected: 16; Actual: 9
Unexpected Size for AutoLayoutMinPacking`1[System.IntPtr].
Expected: 16; Actual: 9
Unexpected Size for AutoLayoutMinPacking`1[System.Single].
Expected: 8; Actual: 5
Unexpected Size for AutoLayoutMinPacking`1[System.UInt16].
Expected: 4; Actual: 3
Unexpected Size for AutoLayoutMinPacking`1[System.UInt32].
Expected: 8; Actual: 5
Unexpected Size for AutoLayoutMinPacking`1[System.UInt64].
Expected: 16; Actual: 9
Unexpected Size for AutoLayoutMinPacking`1[System.UIntPtr].
Expected: 16; Actual: 9