Description
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:
- For
STOREIND<ref>(...)
with write barriers. - For
[STORE]IND<SIMD12>(...)
nodes.
We should find a way to factor the code such that we do not try to create the uncontainable LEA
s 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