JIT: Switch should create assertions #113992
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
in-pr
There is an active PR which will close this issue when it is merged
reduce-unsafe
Milestone
Currently, JIT can't fold these
x == y
checks, but should be able to. This is a minimal repro for a popular case when Span/Array Length is used for switch and then all legs use that span.For example, any attempt to remove unsafe code from the following function will hit regressions because of it:
runtime/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/PropertyRef.cs
Lines 52 to 69 in a37049f
The text was updated successfully, but these errors were encountered: