[llvm] [AMDGPU] Add the support for `v_cvt_f32_bf16 ` on gfx1250 (PR #145632)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 25 02:03:09 PDT 2025


rampitec wrote:

> > @rampitec For some reason, the instruction encoding works, but the decoder doesn't work. Those dpp decoding tests failed. It looks like we missed something here.
> 
> Check generated lib/Target/AMDGPU/AMDGPUGenDisassemblerTables.inc.
> 
> Search the instruction name. Go to AMDGPUDisassembler.cpp and add line processing that table. DecoderTableGFX125064?
> 
> I.e., this?
> 
> ```
> static const uint8_t DecoderTableGFX125064[] = {
> ...
> /* 220 */     MCD::OPC_Decode, 138, 179, 2, 144, 3, // Opcode: V_CVT_F32_BF16V_CVT_F32_BF16_gfx1250_t16_dpp_gfx1250, DecodeIdx: 400
> /* 226 */     MCD::OPC_CheckPredicateOrFail, 191, 2,
> /* 229 */     MCD::OPC_Decode, 137, 179, 2, 145, 3, // Opcode: V_CVT_F32_BF16V_CVT_F32_BF16_gfx1250_t16_dpp8_gfx1250, DecodeIdx: 401
> /* 235 */     MCD::OPC_FilterValue, 115, 36, 0, 0, // Skip to: 276
> ```
> 
> and this:
> 
> ```
>       if (isGFX1250() &&
>           tryDecodeInst(DecoderTableGFX125064, DecoderTableGFX1250_FAKE1664, MI,
>                         QW, Address, CS))
>         break;
> ```

Note that FAKE16 might not exist yet. I have couple of cases with TODO comments already, because we cannot upstream all at once, and we cannot rollback t16 support already in upstream.

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


More information about the llvm-commits mailing list