Skip to content

Commit 58dd204

Browse files
mariusz-sikora-at-amdmatejaMarjanovicmbrkusanin
authored andcommitted
[AMDGPU][GFX12] VOP encoding and codegen - add support for v_cvt fp8/… (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 <[email protected]> Co-authored-by: Mirko Brkušanin <[email protected]> (cherry picked from commit cfddb59)
1 parent df306d3 commit 58dd204

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

llvm/test/MC/AMDGPU/gfx12_asm_vop1.s

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,51 @@ v_cvt_pk_f32_fp8_e32 v[2:3], 3
444444
v_cvt_pk_f32_fp8_e32 v[2:3], v3
445445
// GFX12: v_cvt_pk_f32_fp8_e32 v[2:3], v3 ; encoding: [0x03,0xdd,0x04,0x7e]
446446

447+
v_cvt_f32_bf8_e32 v1, s3
448+
// GFX12: encoding: [0x03,0xda,0x02,0x7e]
449+
450+
v_cvt_f32_bf8_e32 v1, 3
451+
// GFX12: encoding: [0x83,0xda,0x02,0x7e]
452+
453+
v_cvt_f32_bf8_e32 v1, v3
454+
// GFX12: encoding: [0x03,0xdb,0x02,0x7e]
455+
456+
v_cvt_f32_fp8_e32 v1, s3
457+
// GFX12: encoding: [0x03,0xd8,0x02,0x7e]
458+
459+
v_cvt_f32_fp8_e32 v1, 3
460+
// GFX12: encoding: [0x83,0xd8,0x02,0x7e]
461+
462+
v_cvt_f32_fp8_e32 v1, v3
463+
// GFX12: encoding: [0x03,0xd9,0x02,0x7e]
464+
465+
v_cvt_pk_f32_bf8_e32 v[2:3], s3
466+
// GFX12: encoding: [0x03,0xde,0x04,0x7e]
467+
468+
v_cvt_pk_f32_bf8_e32 v[3:4], s5
469+
// GFX12: encoding: [0x05,0xde,0x06,0x7e]
470+
471+
v_cvt_pk_f32_bf8_e32 v[2:3], 3
472+
// GFX12: encoding: [0x83,0xde,0x04,0x7e]
473+
474+
v_cvt_pk_f32_bf8_e32 v[3:4], 3
475+
// GFX12: encoding: [0x83,0xde,0x06,0x7e]
476+
477+
v_cvt_pk_f32_bf8_e32 v[2:3], v3
478+
// GFX12: encoding: [0x03,0xdf,0x04,0x7e]
479+
480+
v_cvt_pk_f32_bf8_e32 v[3:4], v3
481+
// GFX12: encoding: [0x03,0xdf,0x06,0x7e]
482+
483+
v_cvt_pk_f32_fp8_e32 v[2:3], s3
484+
// GFX12: encoding: [0x03,0xdc,0x04,0x7e]
485+
486+
v_cvt_pk_f32_fp8_e32 v[2:3], 3
487+
// GFX12: encoding: [0x83,0xdc,0x04,0x7e]
488+
489+
v_cvt_pk_f32_fp8_e32 v[2:3], v3
490+
// GFX12: encoding: [0x03,0xdd,0x04,0x7e]
491+
447492
v_cvt_f16_f32 v5, v1
448493
// GFX12: v_cvt_f16_f32_e32 v5, v1 ; encoding: [0x01,0x15,0x0a,0x7e]
449494

0 commit comments

Comments
 (0)