[PATCH] D133334: [AMDGPU][MC] Warn when disassembling v_cmpx instructions
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 6 01:14:33 PDT 2022
foad added a comment.
It seems like target disassemblers in general do not emit warnings, and are lacking the machinery to emit them as proper diagnostics with location information.
================
Comment at: llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp:720
+ !OpIsExec(MI.getOperand(1)) && !OpIsZero(MI.getOperand(3))) {
+ outs() << "Warning: unexpected dst value\n";
+ }
----------------
Warnings should go to errs() shouldn't they?
================
Comment at: llvm/test/MC/Disassembler/AMDGPU/gfx10_vop3cx.txt:1071
+# GFX10-NOT: Warning: unexpected dst value
# GFX10: v_cmpx_f_f64_e64 exec, v[1:2] ; encoding: [0x7e,0x00,0x30,0xd4,0x7e,0x02,0x02,0x00]
----------------
Might be better to do this by changing the RUN lines to use `FileCheck --implicit-check-not="Warning:"`, to catch all unexpected warnings.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133334/new/
https://reviews.llvm.org/D133334
More information about the llvm-commits
mailing list