Skip to content

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

@tgross35

Description

@tgross35
Contributor

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

Activity

tgross35

tgross35 commented on Jul 18, 2024

@tgross35
ContributorAuthor

This reproduces in clang too with -masm=intel https://llvm.godbolt.org/z/5Gz6hnqxs

llvmbot

llvmbot commented on Jul 19, 2024

@llvmbot
Member

@llvm/issue-subscribers-backend-x86

Author: Trevor Gross (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:

&lt;inline asm&gt;: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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tgross35@dtcxzyw@llvmbot

        Issue actions

          `inteldialect` does not handle labels `0:` or `1:` on `x86` · Issue #99547 · llvm/llvm-project