[llvm] [AMDGPU][True16][MC] fix opsel for v_cmpx 16bit inst (PR #135441)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 13 00:56:03 PDT 2025


================
@@ -1220,6 +1220,10 @@ void AMDGPUInstPrinter::printPackedModifier(const MCInst *MI,
         (ModIdx != -1) ? MI->getOperand(ModIdx).getImm() : DefaultValue;
   }
 
+  const bool HasDst =
+      (AMDGPU::getNamedOperandIdx(Opc, AMDGPU::OpName::vdst) != -1) ||
+      (AMDGPU::getNamedOperandIdx(Opc, AMDGPU::OpName::sdst) != -1);
----------------
arsenm wrote:

Would be slightly safer to just check that operand 0 is a def rather than relying on the operand names 

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


More information about the llvm-commits mailing list