Skip to content

Remove redundant store that is immediately after the load in same src/dst #35614

Description

@kunalspathak

I have seen below pattern in generated code for framework libraries. We can eliminate the str if it is storing the value from same register that was used to load in previous instruction from same memory location.

Example of ARM64 code:

B9404260          ldr     w0, [x19,#64]
B9004260          str     w0, [x19,#64]

Example of x64 code:

8B4640               mov      eax, dword ptr [rsi+64]
894640               mov      dword ptr [rsi+64], eax

There are approx. 250 such patterns in 250 methods. Details in ldr-str.txt

category:cq
theme:basic-cq
skill-level:intermediate
cost:medium

Activity

  1. added
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    and removed on Apr 29, 2020
  2. added this to the Future milestone on May 3, 2020
  3. removed
    untriagedNew issue has not been triaged by the area owner
    on May 3, 2020
  4. kunalspathak commented on Sep 8, 2020

    @kunalspathak
    ContributorAuthor

    #39222 fixes this.

  5. ghost locked as resolved and limited conversation to collaborators on Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIoptimization

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions