-
Notifications
You must be signed in to change notification settings - Fork 5.4k
JIT: Switch should create assertions #113992
Copy link
Copy link
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedreduce-unsafe
Milestone
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedreduce-unsafe
Type
Fields
Give feedbackNo fields configured for issues without a type.
Currently, JIT can't fold these
x == ychecks, 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