Skip to content

Commit b8c7013

Browse files
authored
[AMDGPU][MC] Fix disassembler warning for v_cmpx instructions in GFX9 (#163825)
In GFX10+, the v_cmpx_* instructions use EXEC as the implicit dst and do not have explicit dst. Therefore a warning is issued by the disassembler when the dst is not EXEC. However, in GFX9 and earlier, those instructions have EXEC as the implicit dst as well as an explicit dst. The aforementioned warning should not be issued.
1 parent 40d4ea6 commit b8c7013

File tree

3 files changed

+825
-0
lines changed

3 files changed

+825
-0
lines changed

llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,7 @@ DecodeStatus AMDGPUDisassembler::getInstruction(MCInst &MI, uint64_t &Size,
892892
// have EXEC as implicit destination. Issue a warning if encoding for
893893
// vdst is not EXEC.
894894
if ((MCII->get(MI.getOpcode()).TSFlags & SIInstrFlags::VOP3) &&
895+
MCII->get(MI.getOpcode()).getNumDefs() == 0 &&
895896
MCII->get(MI.getOpcode()).hasImplicitDefOfPhysReg(AMDGPU::EXEC)) {
896897
auto ExecEncoding = MRI.getEncodingValue(AMDGPU::EXEC_LO);
897898
if (Bytes_[0] != ExecEncoding)

0 commit comments

Comments
 (0)