-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Open
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 SuperPMIhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorstenet-performancePerformance related issuePerformance related issue
Milestone
Description
Description
CSE seems to fail if I write something like:
uint Natural(uint index)
{
uint arrIndex = index / 3;
uint bitIndex = index % 3;
return arrIndex + bitIndex;
}(it does the division twice).
This seems to only be an issue for unsigned integers not using DivRem.
Configuration
Seems to reproduce on any .NET version on godbolt - I've only checked the issue on x64.
Regression?
Probably not.
Analysis
@tannergooding was saying it seems that UMOD might be missing early expansion altogether & it's getting carried down to rationalisation.
BoyBaykiller and PaulusParssinen
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 SuperPMIhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorstenet-performancePerformance related issuePerformance related issue