-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable UMOD optimization for x64 #68091
Conversation
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsDescription We added an optimization for GT_UMOD in ARM64. This PR enables the same optimization for x64. Acceptance Criteria
|
@kunalspathak @jakobbotsch This is ready. This is a trivial change and the diffs look good; though there are not very many of them. |
Do you know why? I am asking to make sure that we know if these changes are good enough to catch the scenarios or did we miss something. |
You can probably take some methods that were improved in arm64 work and not in x64 and then compare what make us generate differently? |
I think the reason is that this optimization also happens in lowering for x64 where as for ARM64 it does not: https://github.com/dotnet/runtime/blob/main/src/coreclr/jit/lower.cpp#L5556 |
So we were covering x64 but just missed few opportunities that we are also covering with this PR. Is that the case? Wonder what prohibited us from covering those scenarios in x64 prior to your PR. |
That was my thinking. It's similar to SubMulDiv optimization for 'mod' since that exists in both morph and lowering.
Probably just low hanging fruit. |
@kunalspathak is there anything that needs to be done in this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Sorry, I forgot to sign off.
No worries thank you! :) |
Description
We added an optimization for GT_UMOD in ARM64. This PR enables the same optimization for x64.
Acceptance Criteria