[llvm] [LLVM][AArch64]Use load/store with consecutive registers in SME2 or S… (PR #77665)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 20 03:03:48 PDT 2024
================
@@ -3065,19 +3074,40 @@ bool AArch64FrameLowering::spillCalleeSavedRegisters(
std::swap(Reg1, Reg2);
std::swap(FrameIdxReg1, FrameIdxReg2);
}
+
+ unsigned PairRegs;
+ unsigned PnReg;
+ if (RPI.isPaired() && RPI.isScalable()) {
+ PairRegs = AArch64::Z0_Z1 + (RPI.Reg1 - AArch64::Z0);
+ if (!PtrueCreated) {
+ PtrueCreated = true;
+ // Any one of predicate-as-count will be free to use
+ // This can be replaced in the future if needed
+ PnReg = AArch64::PN8;
----------------
sdesmalen-arm wrote:
I'm a little concerned with just blindly picking `pn8` here, because this may not match the given calling convention (if someone would choose to use a different one from the standard SVE calling convention), defined in AArch64CallingConvention.td.
Can you create a function that finds a suitable *caller*-saved register instead?
https://github.com/llvm/llvm-project/pull/77665
More information about the llvm-commits
mailing list