[llvm] [AMDGPU][RFC] Combine asm and disasm tests. (PR #90214)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 00:25:07 PDT 2024


MaskRay wrote:

> > Utilize `-SAME:` directives?
> > ```
> > # RUN: llvm-mc ... %s | FileCheck
> > # RUN: llvm-mc -filetype=obj ... %s | llvm-objdump -d - | FileCheck --check-prefixes=CHECK,ENCODING
> > 
> > # CHECK: nop
> > # ENCODING-SAME: [0,0,0,0]
> > nop
> > ```
> 
> Again, this wouldn't work because `llvm-objdump -d` does not print encodings in the `[0,0,0,0]` form.

llvm-objdump seems to places the encodings as comments. You can check them with `-SAME:`.

> Also, the first RUN line doesn't check the resulting instruction code, so doesn't work as an assembler-side test.

I am confused. Why is `llvm-mc -filetype=obj ... %s | llvm-objdump -d - ` not checking the result?

https://github.com/llvm/llvm-project/pull/90214


More information about the llvm-commits mailing list