From 3648fc5b42bd2c320cb49004cd9c40cd32a44384 Mon Sep 17 00:00:00 2001 From: Joe Nash Date: Tue, 11 Oct 2022 10:24:52 -0400 Subject: [PATCH] [AMDGPU] Make disassembler convertFMAanyK call more generic Make support more generic to support future instructions. Currently NFC. Reviewed By: foad, arsenm Differential Revision: https://reviews.llvm.org/D135678 --- llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp index 9011b4b..4745a35 100644 --- a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp +++ b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp @@ -704,8 +704,8 @@ DecodeStatus AMDGPUDisassembler::getInstruction(MCInst &MI, uint64_t &Size, int ImmLitIdx = AMDGPU::getNamedOperandIdx(MI.getOpcode(), AMDGPU::OpName::imm); - bool isVOP2 = MCII->get(MI.getOpcode()).TSFlags & SIInstrFlags::VOP2; - if (Res && ImmLitIdx != -1 && (isVOP2 || AMDGPU::isVOPD(MI.getOpcode()))) + bool IsSOPK = MCII->get(MI.getOpcode()).TSFlags & SIInstrFlags::SOPK; + if (Res && ImmLitIdx != -1 && !IsSOPK) Res = convertFMAanyK(MI, ImmLitIdx); // if the opcode was not recognized we'll assume a Size of 4 bytes -- 2.7.4