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

Fix and clean up the handling of "must contain" LEAs on ARM64 #74448

Open
SingleAccretion opened this issue Aug 23, 2022 · 1 comment
Open

Fix and clean up the handling of "must contain" LEAs on ARM64 #74448

SingleAccretion opened this issue Aug 23, 2022 · 1 comment
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@SingleAccretion
Copy link
Contributor

SingleAccretion commented Aug 23, 2022

On ARM64, certain LEAs (those with contained indices) must always be contained under indirections.

Currently, there are (at least) two scenarios where we can call TryCreateAddrMode and then not contain the address modes it can create:

  1. For STOREIND<ref>(...) with write barriers.
  2. For [STORE]IND<SIMD12>(...) nodes.

We should find a way to factor the code such that we do not try to create the uncontainable LEAs for them and delete the (incomplete) handling codegen has for them in genLeaInstruction.

Additionally, after #74275, we should no longer need to check IsSafeToContainMem before calling TryCreateAddrMode in LowerIndir/LowerStoreIndirCommon.

Longer-term, we should make it such that we don't need genLeaInstruction or internal registers for indirection nodes on our load-store targets at all, i. e. we should only generate address modes directly supported by the target.

category:correctness
theme:codegen
skill-level:expert
cost:medium
impact:small

@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 Aug 23, 2022
@SingleAccretion SingleAccretion added this to the 8.0.0 milestone Aug 23, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Aug 23, 2022
@ghost
Copy link

ghost commented Aug 23, 2022

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

Issue Details

On ARM64, certain LEAs (those with contained indices) must always be contained under indirections.

Currently, there are (at least) two scenarios where we can call TryCreateAddrMode and then not contain the address modes it can create:

  1. For STOREIND<ref>(...) with write barriers.
  2. For [STORE]IND<SIMD12>(...) nodes.

We should find a way to factor the code such that we do not try to create the uncontainable LEAs for them and delete the (incomplete) handling codegen has for them in genLeaInstruction.

Additionally, after #74275, we should no longer need to check IsSafeToContainMem before calling TryCreateAddrMode in LowerIndir/LowerStoreIndirCommon.

Longer-term, we should make it such that we don't need genLeaInstruction or internal registers for indirection nodes on our load-store targets at all, i. e. we should only generate address modes directly supported by the target.

Author: SingleAccretion
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@JulieLeeMSFT JulieLeeMSFT removed the untriaged New issue has not been triaged by the area owner label Aug 24, 2022
@SingleAccretion SingleAccretion modified the milestones: 8.0.0, Future Mar 27, 2023
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

No branches or pull requests

2 participants