[AArch64] Improve access to fixed-width object when stack has SVE.
authorSander de Smalen <sander.desmalen@arm.com>
Thu, 3 Mar 2022 14:09:26 +0000 (14:09 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Fri, 4 Mar 2022 09:33:59 +0000 (09:33 +0000)
commit7c65d2288bfd03ca3c3e829c7746b5e4e495357f
treea4ff98fb9d50a9d530fea5690c6d25a661a5e36e
parentd363bddac5ef538b87423a78be9450a94e36e0d8
[AArch64] Improve access to fixed-width object when stack has SVE.

When the stack has SVE objects, fixed-width objects are often better accessed
from the SP, instead of the FP, because part/all of the fixed-width offset
can be folded into the (non-scalable) addressing mode, where otherwise an
ADDVL would be required.

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D120738
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/test/CodeGen/AArch64/framelayout-sve-fixed-width-access.mir
llvm/test/CodeGen/AArch64/stack-guard-sve.ll