[llvm] [AArch64] Disable red-zone when lowering Q-reg copy through memory. (PR #94962)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 08:36:36 PDT 2024


================
@@ -431,8 +431,15 @@ bool AArch64FrameLowering::canUseRedZone(const MachineFunction &MF) const {
   const AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>();
   uint64_t NumBytes = AFI->getLocalStackSize();
 
+  // If neither NEON or SVE are available, a COPY from one Q-reg to
+  // another requires a spill -> reload sequence. We can do that
+  // using a pre-decrementing store/post-decrementing load, but
+  // if we do so, we can't use the Red Zone.
+  bool LowerQRegCopyThroughMem =
+      !Subtarget.isNeonAvailable() && !Subtarget.hasSVE();
----------------
efriedma-quic wrote:

Maybe check for hasFPARMv8(), so this doesn't impact soft-fp code?

https://github.com/llvm/llvm-project/pull/94962


More information about the llvm-commits mailing list