Optimize checks against close integer values.
Open
area-CodeGen-coreclr
help wanted
tenet-performance
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
### Description
Checks like `i == 0 || i == -1` or `i == 0 || i == -2` currently get emitted as separate checks instead of an optimal combined check.
### Configuration
any
### Regression?
no
### Data
Current codegen: https://compiler-explorer.com/z/eaGv9easn
Desired codegen from C++: https://godbolt.org/z/avq3odcoP
Contributor guide
Assessment
This issue has not been assessed yet.