[mir-opt] Simplify SwitchInt
s of explictly written ranges to range tests
#67488
Labels
A-mir-opt
Area: MIR optimizations
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Consider the program:
We will generate the following
SwitchInt
:Ostensibly, something like this would be more profitable:
This is the code you get from the range pattern
0..=4
.cc @wesleywiser @oli-obk
The text was updated successfully, but these errors were encountered: