Issue 176103
Summary [MCA] Bad formatting for some instructions
Labels new issue
Assignees
Reporter foxtran
    Considering the following code:
```C
int asmC1() {
    asm (
        "stp x29, x0, [sp, #-16]!\n"
        "ldp x29, x0, [sp], #16\n"
    );
    return 0;
}
```
for which the Assembly on AArch64 looks like:
```asm
asmC1():
        stp     x29, x0, [sp, #-16]!
        ldp     x29, x0, [sp], #16

        mov     w0, wzr
 ret
```


Running  of `llvm-mca` with arguments `-timeline -mcpu=cortex-a55` gives a bit strange output with extra dots for `stp` instruction:
```

[0,0]     D    .    .    .    .    .    .    .    .    . .   stp	x29, x0, [sp, #-16]!
[0,1]     DeeeeE    .    .    .    .    . .    .    .    .   ldp	x29, x0, [sp], #16
[0,2]     . DeeE    .    .    . .    .    .    .    .    .   mov	w0, wzr
[0,3]     .   DE    .    .    . .    .    .    .    .    .   ret
[1,0]     .    DE    .    .    .    . .    .    .    .    .    .   stp	x29, x0, [sp, #-16]!
[1,1]     .    DeeeeE .    .    .    .    .    .    .    .   ldp	x29, x0, [sp], #16
[1,2] .    . DeeE    .    .    .    .    .    .    .    .   mov	w0, wzr
[1,3] .    .   DE    .    .    .    .    .    .    .    .   ret
[2,0]     .    . DE    .    .    .    .    .    .    .    .    .    .   stp	x29, x0, [sp, #-16]!
[2,1]     .    .    DeeeeE    .    .    .    .    .    .    . ldp	x29, x0, [sp], #16
[2,2]     .    .    . DeeE    .    .    .    .    . .    .   mov	w0, wzr
[2,3]     .    .    .   DE    .    .    .    .    . .    .   ret
[3,0]     .    .    .    DE    .    .    .    .    .    . .    .    .    .   stp	x29, x0, [sp, #-16]!
[3,1]     .    .    .    DeeeeE .    .    .    .    .    .   ldp	x29, x0, [sp], #16
[3,2]     .    . .    . DeeE    .    .    .    .    .    .   mov	w0, wzr
[3,3]     .    . .    .   DE    .    .    .    .    .    .   ret
[4,0]     .    .    .    . DE    .    .    .    .    .    .    .    .    .    .   stp	x29, x0, [sp, #-16]!
[4,1]     .    .    .    .    DeeeeE    .    .    .    .    . ldp	x29, x0, [sp], #16
[4,2]     .    .    .    .    . DeeE    .    .    . .    .   mov	w0, wzr
[4,3]     .    .    .    .    .   DE    .    .    . .    .   ret
[5,0]     .    .    .    .    .    DE    .    .    .    . .    .    .    .    .    .   stp	x29, x0, [sp, #-16]!
[5,1]     .    .    . .    .    DeeeeE    .    .    .    .   ldp	x29, x0, [sp], #16
[5,2] .    .    .    .    .    . DeeE    .    .    .    .   mov	w0, wzr
[5,3] .    .    .    .    .    .   DE    .    .    .    .   ret
[6,0]     .    . .    .    .    .    DE    .    .    .    .    .    .    .    .    .    . stp	x29, x0, [sp, #-16]!
[6,1]     .    .    .    .    .    .    DeeeeE .    .    .   ldp	x29, x0, [sp], #16
[6,2]     .    .    .    .    .    . . DeeE    .    .    .   mov	w0, wzr
[6,3]     .    .    .    .    .    . .   DE    .    .    .   ret
[7,0]     .    .    .    .    .    .    .    DE .    .    .    .    .    .    .    .    .    .   stp	x29, x0, [sp, #-16]!
[7,1]     .    .    .    .    .    .    .    DeeeeE    .    . ldp	x29, x0, [sp], #16
[7,2]     .    .    .    .    .    .    .    . DeeE .    .   mov	w0, wzr
[7,3]     .    .    .    .    .    .    .    .   DE .    .   ret
[8,0]     .    .    .    .    .    .    .    .    DE    . .    .    .    .    .    .    .    .    .   stp	x29, x0, [sp, #-16]!
[8,1] .    .    .    .    .    .    .    .    DeeeeE    .   ldp	x29, x0, [sp], #16
[8,2]     .    .    .    .    .    .    .    .    . DeeE    .   mov	w0, wzr
[8,3]     .    .    .    .    .    .    .    .    .   DE    . ret
[9,0]     .    .    .    .    .    .    .    .    .    DE    .    .    . .    .    .    .    .    .    .   stp	x29, x0, [sp, #-16]!
[9,1]     . .    .    .    .    .    .    .    .    DeeeeE   ldp	x29, x0, [sp], #16
[9,2]     .    .    .    .    .    .    .    .    .    . DeeE   mov	w0, wzr
[9,3]     .    .    .    .    .    .    .    .    .    .   DE ret
```

Example on godbolt: https://godbolt.org/z/46erYsj7r
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to