Skip to content

Commit 507b846

Browse files
mariusz-sikora-at-amdmatejaMarjanovicmbrkusanin
authored and
Shivam Gupta
committed
[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 792cac2 commit 507b846

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
@@ -446,6 +446,51 @@ v_cvt_pk_f32_fp8_e32 v[2:3], 3
446446
v_cvt_pk_f32_fp8_e32 v[2:3], v3
447447
// GFX12: v_cvt_pk_f32_fp8_e32 v[2:3], v3 ; encoding: [0x03,0xdd,0x04,0x7e]
448448

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

0 commit comments

Comments
 (0)