Skip to content

GlobalISel does not detect hasOpaqueSPAdjustment from inline asm #46222

Open
@arsenm

Description

@arsenm
Bugzilla Link 46878
Version trunk
OS Linux
CC @qcolombet

Extended Description

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions