-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Switch recognition should not be lexical #107076
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 merged
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 merged
Type
Fields
Give feedbackNo fields configured for issues without a type.
runtime/src/coreclr/jit/switchrecognition.cpp
Lines 172 to 173 in 7ff684a
The switch recognition is currently lexical for (from what I can tell) no good reason. Instead, it seems we should be able to recognize any chain of comparisons by following the "did not equal" target.
cc @dotnet/jit-contrib @JulieLeeMSFT @EgorBo