[llvm-bugs] [Bug 46878] New: GlobalISel does not detect hasOpaqueSPAdjustment from inline asm

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 28 15:10:20 PDT 2020


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

            Bug ID: 46878
           Summary: GlobalISel does not detect hasOpaqueSPAdjustment from
                    inline asm
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: GlobalISel
          Assignee: unassignedbugs at nondot.org
          Reporter: Matthew.Arsenault at amd.com
                CC: llvm-bugs at lists.llvm.org, quentin.colombet at gmail.com

SelectionDAG detects inline asm with the stack pointer in the clobbers list,
and sets a field in the MachineFrameInfo. This is done in FunctionLoweringInfo,
and there's no equivalent check in GlobalISel


define void @opaque_sp() {
  call void asm sideeffect "mov $0, #1", "~{sp}"()
  ret void
}

llc -global-isel=0 -mtriple=aarch64-- -o - sp.ll -stop-after=finalize-isel |
grep hasOpaqueSPAdjustment
  hasOpaqueSPAdjustment: true

llc -global-isel=1 -mtriple=aarch64-- -o - sp.ll  -stop-after=finalize-isel |
grep hasOpaqueSPAdjustment
  hasOpaqueSPAdjustment: false

-- 
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/20200728/bfa54e32/attachment.html>


More information about the llvm-bugs mailing list