arm64: Optimise GT/GE/LT/LE comparisons to constant zero - #119758
#119758Merged
EgorBo merged 10 commits intoOct 20, 2025
dotnet:maindotnet/runtime:mainfrom
jonathandavies-arm:upstream/ce/flag-zerojonathandavies-arm/runtime:upstream/ce/flag-zeroCopy head branch name to clipboard
Merged
arm64: Optimise GT/GE/LT/LE comparisons to constant zero#119758EgorBo merged 10 commits intodotnet:maindotnet/runtime:mainfrom jonathandavies-arm:upstream/ce/flag-zerojonathandavies-arm/runtime:upstream/ce/flag-zeroCopy head branch name to clipboard
EgorBo merged 10 commits into
dotnet:maindotnet/runtime:mainfrom
jonathandavies-arm:upstream/ce/flag-zerojonathandavies-arm/runtime:upstream/ce/flag-zeroCopy head branch name to clipboard
Conversation
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
jonathandavies-arm
marked this pull request as draft
September 16, 2025 13:05
This was referenced Sep 26, 2025
Open
jonathandavies-arm
marked this pull request as ready for review
September 29, 2025 09:57
Contributor
Author
Contributor
|
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 |
EgorBo
self-requested a review
September 29, 2025 13:26
Member
|
@EgorBo if this is ready can we merge? |
Contributor
|
@MihuBot -arm |
Contributor
@EgorBo Which optimization is being missed here, |
Member
hm.. i do not recall this, last round of SPMI was a clean improvement if my memory is not failing me? |
Contributor
I think there were 3-4 similar regressions, the build has since been deleted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.