Skip to content

inteldialect does not handle labels 0: or 1: on x86 #99547

Open
@tgross35

Description

@tgross35

The below code:

define void @demo() {
start:
  call void asm inteldialect "0: jmp 0b", ""()
  ret void
}

Should build. Instead, it provides an inaccurate error message:

<inline asm>:2:5: error: invalid operand for instruction
        0: jmp 0b
           ^
Compiler returned: 1

This only happens on x86 and x86_64, other platforms seem not to be affected. This looks like another case of #35492, cc @rnk who authored 953bdce.

Link: https://llvm.godbolt.org/z/WWvWMzznK
Original repro: https://rust.godbolt.org/z/qP3Kd3Ts7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions