Skip to content

Commit

Permalink
[AMDGPU][GFX12] VOP encoding and codegen - add support for v_cvt fp8/… (
Browse files Browse the repository at this point in the history
llvm#78414)

…bf8 instructions

    Add VOP1, VOP1_DPP8, VOP1_DPP16, VOP3, VOP3_DPP8, VOP3_DPP16
    instructions that were supported on GFX940 (MI300):
    - V_CVT_F32_FP8
    - V_CVT_F32_BF8
    - V_CVT_PK_F32_FP8
    - V_CVT_PK_F32_BF8
    - V_CVT_PK_FP8_F32
    - V_CVT_PK_BF8_F32
    - V_CVT_SR_FP8_F32
    - V_CVT_SR_BF8_F32

---------

Co-authored-by: Mateja Marjanovic <mateja.marjanovic@amd.com>
Co-authored-by: Mirko Brkušanin <Mirko.Brkusanin@amd.com>
(cherry picked from commit cfddb59)
  • Loading branch information
mariusz-sikora-at-amd authored and Shivam Gupta committed Sep 9, 2024
1 parent 792cac2 commit 507b846
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions llvm/test/MC/AMDGPU/gfx12_asm_vop1.s
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,51 @@ v_cvt_pk_f32_fp8_e32 v[2:3], 3
v_cvt_pk_f32_fp8_e32 v[2:3], v3
// GFX12: v_cvt_pk_f32_fp8_e32 v[2:3], v3 ; encoding: [0x03,0xdd,0x04,0x7e]

v_cvt_f32_bf8_e32 v1, s3
// GFX12: encoding: [0x03,0xda,0x02,0x7e]

v_cvt_f32_bf8_e32 v1, 3
// GFX12: encoding: [0x83,0xda,0x02,0x7e]

v_cvt_f32_bf8_e32 v1, v3
// GFX12: encoding: [0x03,0xdb,0x02,0x7e]

v_cvt_f32_fp8_e32 v1, s3
// GFX12: encoding: [0x03,0xd8,0x02,0x7e]

v_cvt_f32_fp8_e32 v1, 3
// GFX12: encoding: [0x83,0xd8,0x02,0x7e]

v_cvt_f32_fp8_e32 v1, v3
// GFX12: encoding: [0x03,0xd9,0x02,0x7e]

v_cvt_pk_f32_bf8_e32 v[2:3], s3
// GFX12: encoding: [0x03,0xde,0x04,0x7e]

v_cvt_pk_f32_bf8_e32 v[3:4], s5
// GFX12: encoding: [0x05,0xde,0x06,0x7e]

v_cvt_pk_f32_bf8_e32 v[2:3], 3
// GFX12: encoding: [0x83,0xde,0x04,0x7e]

v_cvt_pk_f32_bf8_e32 v[3:4], 3
// GFX12: encoding: [0x83,0xde,0x06,0x7e]

v_cvt_pk_f32_bf8_e32 v[2:3], v3
// GFX12: encoding: [0x03,0xdf,0x04,0x7e]

v_cvt_pk_f32_bf8_e32 v[3:4], v3
// GFX12: encoding: [0x03,0xdf,0x06,0x7e]

v_cvt_pk_f32_fp8_e32 v[2:3], s3
// GFX12: encoding: [0x03,0xdc,0x04,0x7e]

v_cvt_pk_f32_fp8_e32 v[2:3], 3
// GFX12: encoding: [0x83,0xdc,0x04,0x7e]

v_cvt_pk_f32_fp8_e32 v[2:3], v3
// GFX12: encoding: [0x03,0xdd,0x04,0x7e]

v_cvt_f16_f32 v5, v1
// GFX12: v_cvt_f16_f32_e32 v5, v1 ; encoding: [0x01,0x15,0x0a,0x7e]

Expand Down

0 comments on commit 507b846

Please sign in to comment.