1 comment (1 comment)0 reactions (0 reactions)0 assignees (0 assignees)C#5,445 forks (5,445 forks)batch import
area-CodeGen-coreclrhelp wantedtenet-performance
Repository metrics
- Stars
- 17,886 stars (17,886 stars)
- PR merge metrics
- Avg merge 12d 11h (Avg merge 12d 11h)661 merged PRs in 30d (661 merged PRs in 30d)
Description
At the moment, we do not optimize x % {pow2_cns} to x & (pow2_cns - 1) for ulong types as they get transformed differently in morph.cpp. I believe we should only do this for X64 and not X86.
Contributor guide
- Research direction
- Investigate morph.cpp in the dotnet/runtime repository to understand the existing optimization for `x % pow2 cns` for signed and unsigned integer types. The issue notes that ulong types are not transformed to `x & (pow2 cns 1)` because they are handled differently. Review the comment in the issue for additional context. Ensure the optimization is applied only for X64, not X86, and verify via testing.
- Tech stack
- csharpcpp
- Domain
- backendperformance
- Issue type
- Performance
- Prerequisites
- C++ programmingJIT compiler internalsx64 architecture basics