Skip to content
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] JIT: Better addressing modes around bytes #66902

Merged
merged 1 commit into from Mar 23, 2022

Conversation

EgorBo
Copy link
Member

@EgorBo EgorBo commented Mar 20, 2022

byte Test(byte* a, int i) => a[i];

Codegen diff:

; Method Program:Test(long,int):ubyte:this
G_M39407_IG01:
        A9BF7BFD          stp     fp, lr, [sp,#-16]!
        910003FD          mov     fp, sp
G_M39407_IG02:
-       8B22C020          add     x0, x1, w2, SXTW
-       39400000          ldrb    w0, [x0]
+       3862D820          ldrb    w0, [x1, w2, SXTW #2]
G_M39407_IG03:
        A8C17BFD          ldp     fp, lr, [sp],#16
        D65F03C0          ret     lr
-; Total bytes of code: 24
+; Total bytes of code: 20
benchmarks.run.windows.arm64.checked.mch:
Total bytes of delta: -9912 (-0.09 % of base)

coreclr_tests.pmi.windows.arm64.checked.mch:
Total bytes of delta: -18176 (-0.01 % of base)

libraries.crossgen2.windows.arm64.checked.mch:
Total bytes of delta: -14856 (-0.03 % of base)

libraries.pmi.windows.arm64.checked.mch:
Total bytes of delta: -29956 (-0.06 % of base)

libraries_tests.pmi.windows.arm64.checked.mch:
Total bytes of delta: -36848 (-0.03 % of base)

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 20, 2022
@ghost ghost assigned EgorBo Mar 20, 2022
@ghost
Copy link

ghost commented Mar 20, 2022

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details
byte Test(byte* a, int i) => a[i];

Codegen diff:

; Method Program:Test(long,int):ubyte:this
G_M39407_IG01:
        A9BF7BFD          stp     fp, lr, [sp,#-16]!
        910003FD          mov     fp, sp
G_M39407_IG02:
-       8B22C020          add     x0, x1, w2, SXTW
-       39400000          ldrb    w0, [x0]
+       3862D820          ldrb    w0, [x1, w2, SXTW #2]
G_M39407_IG03:
        A8C17BFD          ldp     fp, lr, [sp],#16
        D65F03C0          ret     lr
-; Total bytes of code: 24
+; Total bytes of code: 20

Local diffs were quite promising..

Author: EgorBo
Assignees: EgorBo
Labels:

area-CodeGen-coreclr

Milestone: -

@EgorBo EgorBo force-pushed the jit-addr-mode-improvements branch from bf171f7 to fc32a30 Compare March 20, 2022 21:48
@EgorBo EgorBo marked this pull request as ready for review March 21, 2022 06:46
@EgorBo
Copy link
Member Author

EgorBo commented Mar 21, 2022

@dotnet/jit-contrib PTAL

@EgorBo
Copy link
Member Author

EgorBo commented Mar 21, 2022

/azp list

@azure-pipelines

This comment was marked as resolved.

@EgorBo
Copy link
Member Author

EgorBo commented Mar 21, 2022

/azp run runtime-coreclr jitstress, runtime-coreclr jitstressregs, runtime-coreclr outerloop, Fuzzlyn, runtime-libraries-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 5 pipeline(s).

@EgorBo EgorBo merged commit 320f473 into dotnet:main Mar 23, 2022
radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Mar 30, 2022
@dotnet dotnet locked as resolved and limited conversation to collaborators Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants