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? |
kunalspathak
left a comment
There was a problem hiding this comment.
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