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

Ivan Kosarev via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 07:52:07 PDT 2024


https://github.com/kosarev commented:

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

Not until it's disassembled, I'm afraid, which is another RUN line, which is invovenient. And so is having two check lines where one would do, as Matt pointed out. Having two separate check lines also means they may match what is not a complete instruction, e.g., `flat_load_d16_b16 v5, v[1:2]` where the actual instruction may be `flat_load_d16_b16 v5, v[1:2] offset:0`.

These details apart, I also must admit I don't quite follow this view that testing is not something of sufficient importance to be properly reflected in our code infrastructure and that it should instead seek its ways around, such as by using `llvm-objdump`. `llvm-mc` is, by design, a tool for internal use, testing and debugging, our interface to the MC layer, and I would expect it to cover whatever use cases we developers have for it. Same for specifically the MCAsmStreamer's logic emitting instruction codes, which by the way includes verbalisation of relocations/fix-ups that I'm not sure how we could test using `llvm-objdump`.

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


More information about the llvm-commits mailing list