[PATCH] D20185: [AArch64] Fix bug in large stack spill slot handling (PR27717)

Geoff Berry via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 15:34:17 PDT 2016


gberry created this revision.
gberry added a reviewer: t.p.northover.
gberry added a subscriber: llvm-commits.
Herald added subscribers: mcrosier, rengolin, aemerson.

Fix bug in MachO path where a frame index offset would not be reserved
for handling large frames when an extra non-used callee-save register
was saved.  In the case where the extra register is reserved or not a
GPR (e.g. %FP in the MachO case), this would lead to the register
scavenger later failing when called from PrologEpilogInserter.

http://reviews.llvm.org/D20185

Files:
  lib/Target/AArch64/AArch64FrameLowering.cpp

Index: lib/Target/AArch64/AArch64FrameLowering.cpp
===================================================================
--- lib/Target/AArch64/AArch64FrameLowering.cpp
+++ lib/Target/AArch64/AArch64FrameLowering.cpp
@@ -1126,7 +1126,9 @@
     // FIXME: the usual format is actually better if unwinding isn't needed.
     if (produceCompactUnwindFrame(MF) && !SavedRegs.test(PairedReg)) {
       SavedRegs.set(PairedReg);
-      ExtraCSSpill = true;
+      if (AArch64::GPR64RegClass.contains(PairedReg) &&
+          !RegInfo->isReservedReg(MF, PairedReg))
+        ExtraCSSpill = true;
     }
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20185.56973.patch
Type: text/x-patch
Size: 600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160511/5ec8b649/attachment.bin>


More information about the llvm-commits mailing list