-
Couldn't load subscription status.
- Fork 5.2k
arm64: Optimise GT/GE/LT/LE comparisons to constant zero #119758
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
arm64: Optimise GT/GE/LT/LE comparisons to constant zero #119758
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
Diffs show a small number of regressions, e.g.: ; System.IO.Tests.File_NotifyFilter_Tests:FileSystemWatcher_File_NotifyFilter_Size(int):this (FullOpts)
@@ -160,11 +160,13 @@ G_M49668_IG03: ; bbWeight=0.50, gcVars=0000000000008000 {V03}, gcrefRegs=
movk x0, #1 LSL #32
str x0, [x19, #0x18]
mov w23, wzr
- and w0, w20, #124
cmp w20, #8
ccmp w20, #16, z, ne
- ccmp w0, #0, 0, ne
- bgt G_M49668_IG04
+ cset x0, eq
+ ands w1, w20, #124
+ cset x1, gt
+ orr w0, w0, w1
+ cbnz w0, G_M49668_IG04
movz x0, #0xD1FFAB1E // code for System.PlatformDetection:get_IsWindows7():bool
movk x0, #0xD1FFAB1E LSL #16
movk x0, #1 LSL #32
@@ -174,7 +176,7 @@ G_M49668_IG03: ; bbWeight=0.50, gcVars=0000000000008000 {V03}, gcrefRegs=
cbz w0, G_M49668_IG05
cmp w20, #4
bne G_M49668_IG05
- ;; size=132 bbWeight=0.50 PerfScore 12.75
+ ;; size=140 bbWeight=0.50 PerfScore 13.25 |
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.
Thanks for adding tests!
|
@EgorBo if this is ready can we merge? |
|
@MihuBot -arm |
@EgorBo Which optimization is being missed here, |
hm.. i do not recall this, last round of SPMI was a clean improvement if my memory is not failing me? |
I think there were 3-4 similar regressions, the build has since been deleted. |
No description provided.