Issue 64735
Summary llvm-mca reporting error on valid x86 assembly.
Labels bug, tools:llvm-mca
Assignees
Reporter hiraditya
    ```asm
h:
 push    r14 
        push    rbx 
        push    rax 
 mov     r14, qword ptr [rdi]
        cmp     r14, qword ptr [rdi + 8]
 je      .LBB2_3
        mov     rbx, rdi 
.LBB2_2:
 mov     edi, dword ptr [r14]
        call    f(int)@PLT
        add r14, 4
        cmp     r14, qword ptr [rbx + 8]
        jne .LBB2_2
.LBB2_3:
        add     rsp, 8
        pop     rbx 
 pop     r14 
        ret
```


$ ./build/bin/llvm-mca -mtriple x86_64-unknown-linux-gnu -iterations=20 a.s


```sh
a.s:5:28: error: unexpected token in argument list
        mov     r14, qword ptr [rdi]
 ^
a.s:6:28: error: unexpected token in argument list
        cmp r14, qword ptr [rdi + 8]
                           ^
a.s:8:9: error: unknown use of instruction mnemonic without a size suffix
        mov rbx, rdi
        ^
a.s:10:28: error: unexpected token in argument list
        mov     edi, dword ptr [r14]
 ^
a.s:11:19: error: expected register here
        call f(int)@PLT
                  ^
a.s:12:9: error: unknown use of instruction mnemonic without a size suffix
        add     r14, 4
 ^
a.s:13:28: error: unexpected token in argument list
        cmp r14, qword ptr [rbx + 8]
                           ^
a.s:16:9: error: unknown use of instruction mnemonic without a size suffix
        add rsp, 8
        ^
a.s:1:1: error: symbol 'h' is already defined
h:
^
a.s:5:28: error: unexpected token in argument list
 mov     r14, qword ptr [rdi]
 ^
a.s:6:28: error: unexpected token in argument list
        cmp r14, qword ptr [rdi + 8]
                           ^
a.s:8:9: error: unknown use of instruction mnemonic without a size suffix
        mov rbx, rdi
        ^
a.s:9:1: error: symbol '.LBB2_2' is already defined
.LBB2_2:
^
a.s:10:28: error: unexpected token in argument list
        mov     edi, dword ptr [r14]
 ^
a.s:11:19: error: expected register here
        call f(int)@PLT
                  ^
a.s:12:9: error: unknown use of instruction mnemonic without a size suffix
        add     r14, 4
 ^
a.s:13:28: error: unexpected token in argument list
        cmp r14, qword ptr [rbx + 8]
                           ^
a.s:15:1: error: symbol '.LBB2_3' is already defined
.LBB2_3:
^
a.s:16:9: error: unknown use of instruction mnemonic without a size suffix
        add rsp, 8
        ^
```
 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to