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

[mono][jit] Paired stores and loads are now used for vtypes in regs on arm64 #91925

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

jandupej
Copy link
Member

When loading into memory a vtype stored in multiple GP regs, paired loads are used. Analogously, paired stores are used when possible. This change affects only mini.

static Vector128<float> DUT (Vector128<float> a)
{
   return a + Vector128<float>.Zero;
}

Original codegen:

0000000000000000        stp     x29, x30, [sp, #-0x30]!
0000000000000004        mov     x29, sp
0000000000000008        str     x0, [x29, #0x20]
000000000000000c        str     x1, [x29, #0x28]
0000000000000010        eor.16b v1, v1, v1
0000000000000014        ldr     q0, [x29, #0x20]
0000000000000018        fadd.4s v0, v0, v1
000000000000001c        str     q0, [x29, #0x10]
0000000000000020        ldr     x0, [x29, #0x10]
0000000000000024        ldr     x1, [x29, #0x18]
0000000000000028        mov     sp, x29
000000000000002c        ldp     x29, x30, [sp], #0x30
0000000000000030        ret

After change:

0000000000000000        stp     x29, x30, [sp, #-0x30]!
0000000000000004        mov     x29, sp
0000000000000008        stp     x0, x1, [x29, #0x20]
000000000000000c        eor.16b v1, v1, v1
0000000000000010        ldr     q0, [x29, #0x20]
0000000000000014        fadd.4s v0, v0, v1
0000000000000018        str     q0, [x29, #0x10]
000000000000001c        ldp     x0, x1, [x29, #0x10]
0000000000000020        mov     sp, x29
0000000000000024        ldp     x29, x30, [sp], #0x30
0000000000000028        ret

@jandupej jandupej added this to the 9.0.0 milestone Sep 12, 2023
@jandupej jandupej self-assigned this Sep 12, 2023
@jandupej
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jandupej
Copy link
Member Author

All failures seem to map to known issues. Merging.

@jandupej jandupej merged commit a11628c into dotnet:main Sep 13, 2023
142 of 156 checks passed
@matouskozak
Copy link
Member

LGTM!

@ghost ghost locked as resolved and limited conversation to collaborators Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants