summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/JitBlue/GitHub_24159
AgeCommit message (Collapse)AuthorFilesLines
2019-05-09Mark local struct as having overlapping fields after struct reinterpretationEugene Rozenfeld2-0/+78
Methods like System.Runtime.CompilerServices.Unsafe.As<TFrom, TTo> may have struct reinterpretation when function signature specifies Struct1& and the method returns Struct2& where Struct1 and Struct2 are different structs. This may confuse jit optimizations (in particular, value numbering) because fields of a struct of type Struct1 may be accessed using handles of Struct2. This fix marks the source local involved in such struct reinterpretation as having overlapping fields. That prevents SSA builder from inserting the local into SSA. Fixes #24159. No diffs in framework assemblies and coreclr benchmarks.