[llvm] [AMDGPU][MC] GFX9 - allow op_sel in v_interp_p2_f16 (PR #150712)
Jun Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 14 13:06:11 PDT 2025
================
@@ -1299,6 +1299,14 @@ void AMDGPUInstPrinter::printOpSel(const MCInst *MI, unsigned,
O << " op_sel:[" << FI << ',' << BC << ']';
return;
}
+ if (Opc == AMDGPU::V_INTERP_P2_F16_opsel_gfx9) {
----------------
jwanggit86 wrote:
This is done in the latest commit. However, in `printPackedModifier()` it checks for the operands src0, src1, and src2 in that order to determine the number of operands (translate to number of elements in the op_sel array to be printed). It stops as soon as an operand is missing. This particular instruction is a little unusual in that it has src0, src2, but no src1. So `printPackedModifier()` would assume it only has 1 operand, src0. So in the printout, op_sel[] would have 2 elements, one for src0 and one for dst. To accommodate this instruction, I had to make a change to `printPackedModifier()`.
https://github.com/llvm/llvm-project/pull/150712
More information about the llvm-commits
mailing list