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: suboptimal codegen for Vector64.Create(1) #101661

Open
EgorBo opened this issue Apr 28, 2024 · 1 comment · May be fixed by #101662
Open

ARM64: suboptimal codegen for Vector64.Create(1) #101661

EgorBo opened this issue Apr 28, 2024 · 1 comment · May be fixed by #101662
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@EgorBo
Copy link
Member

EgorBo commented Apr 28, 2024

Vector64<int> Test() => Vector64.Create(1);

Proposed codegen diff:

; Method Prog:Test():System.Runtime.Intrinsics.Vector64`1[int]:this (FullOpts)
G_M63775_IG01:
            stp     fp, lr, [sp, #-0x10]!
            mov     fp, sp
G_M63775_IG02:
-           ldr     d0, [@RWD00]
+           movi    v0.2s, #1
G_M63775_IG03:
            ldp     fp, lr, [sp], #0x10
            ret     lr
-RWD00  	dq	0000000100000001h
; Total bytes of code: 20

PS: actually, not just Vector64.Create(1), but any imm-able constant for movi

@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 Apr 28, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 28, 2024
@EgorBo EgorBo added this to the Future milestone Apr 28, 2024
@EgorBo EgorBo removed the untriaged New issue has not been triaged by the area owner label Apr 28, 2024
Copy link
Contributor

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

@EgorBo EgorBo linked a pull request Apr 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant