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: unassignedb...@nondot.org
          Reporter: matthew.arsena...@amd.com
                CC: llvm-bugs@lists.llvm.org, quentin.colom...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to