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: Optimize redundant memory loads with mov #35141

Closed
kunalspathak opened this issue Apr 17, 2020 · 2 comments · Fixed by #83458
Closed

ARM64: Optimize redundant memory loads with mov #35141

kunalspathak opened this issue Apr 17, 2020 · 2 comments · Fixed by #83458
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI memory model issues associated with memory model
Milestone

Comments

@kunalspathak
Copy link
Member

kunalspathak commented Apr 17, 2020

ldr     w1, [fp,#28]
ldr     w0, [fp,#28]

The 2nd load can be converted into mov which takes 2 fewer cycles than ldr.

ldr     w1, [fp,#28]
mov     w0, w1

I collected no. of such ldr pairs in framework libraries and found approx. 540 pairs in 300 methods.

Details:

ldr_to_mov.txt

category:cq
theme:optimization
skill-level:intermediate
cost:small

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Apr 17, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label.

@kunalspathak kunalspathak added arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels Apr 17, 2020
@BruceForstall BruceForstall added this to the Future milestone Apr 20, 2020
@BruceForstall BruceForstall removed the untriaged New issue has not been triaged by the area owner label Apr 20, 2020
@BruceForstall BruceForstall added the JitUntriaged CLR JIT issues needing additional triage label Oct 28, 2020
@kunalspathak kunalspathak modified the milestones: Future, 6.0.0 Nov 9, 2020
@kunalspathak kunalspathak removed the JitUntriaged CLR JIT issues needing additional triage label Nov 9, 2020
@JulieLeeMSFT JulieLeeMSFT modified the milestones: 6.0.0, Future Mar 23, 2021
@EgorBo
Copy link
Member

EgorBo commented Oct 15, 2021

NOTE: this opt should not be done for loads of "volatile" fields

@VSadov VSadov added the memory model issues associated with memory model label Sep 7, 2022
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 15, 2023
@JulieLeeMSFT JulieLeeMSFT modified the milestones: Future, 8.0.0 Mar 15, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Mar 21, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI memory model issues associated with memory model
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants