[llvm-bugs] [Bug 27717] New: AArch64-ios: Cannot scavenge register without an emergency spill slot

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 11 13:13:48 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27717

            Bug ID: 27717
           Summary: AArch64-ios: Cannot scavenge register without an
                    emergency spill slot
           Product: libraries
           Version: trunk
          Hardware: Other
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Register Allocator
          Assignee: unassignedbugs at nondot.org
          Reporter: alina.sbirlea at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16361
  --> https://llvm.org/bugs/attachment.cgi?id=16361&action=edit
Test showing the failure.

Running "llc fail.ll" yields assertion failure "Cannot scavenge register
without an emergency spill slot" on aarch64-ios. See attached "fail.ll"

This is caused by not finding a register to scavenge, no architecture specific
handling and because on MachO there isn't an emergency spill slot added.
See line lib/Target/AArch64/AArch64FrameLowering.cpp:1127:
    // MachO's compact unwind format relies on all registers being stored in
    // pairs.
    // FIXME: the usual format is actually better if unwinding isn't needed.
    if (produceCompactUnwindFrame(MF) && !SavedRegs.test(PairedReg)) {
      SavedRegs.set(PairedReg);
      ExtraCSSpill = true;
    }


Unsetting "ExtraCSSpill = true;"(AArch64FrameLowering.cpp:1129) resolves the
issue, but I am unsure this is the right solution.


Side note:
Bug 23444 seemed to be a duplicate at first, but the problem does not reproduce
in the example provided (fn06.bc). Bug 23444 may be fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160511/72927152/attachment.html>


More information about the llvm-bugs mailing list