Skip to content

[AMDGPU][MC] In GFX11+ v_pk_fmac_f16 should not allow DPP #148751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/Target/AMDGPU/VOP2Instructions.td
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@ multiclass VOP2_Real_FULL_with_name_gfx11_gfx12<bits<6> op, string opName,
VOP2_Real_FULL_with_name<GFX12Gen, op, opName, asmName>;

multiclass VOP2_Real_e32_gfx11_gfx12<bits<6> op> :
VOP2Only_Real<GFX11Gen, op>, VOP2Only_Real<GFX12Gen, op>;
VOP2Only_Real_e32<GFX11Gen, op>, VOP2Only_Real_e32<GFX12Gen, op>;

multiclass VOP3Only_Realtriple_gfx11_gfx12<bits<10> op> :
VOP3Only_Realtriple<GFX11Gen, op>, VOP3Only_Realtriple<GFX12Gen, op>;
Expand Down
15 changes: 15 additions & 0 deletions llvm/test/MC/AMDGPU/gfx11_asm_vop2_fake16_err.s
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,21 @@ v_mul_f16_e32 v5, v1, v255
v_mul_f16_e32 v5, v255, v2
// GFX11: :[[@LINE-1]]:1: error: operands are not valid for this GPU or mode

v_pk_fmac_f16 v0, v1, v2 quad_perm:[1,2,3,0]
// GFX11: :[[@LINE-1]]:26: error: not a valid operand.

v_pk_fmac_f16 v0, v1, v2 quad_perm:[1,2,3,0] row_mask:0x0 bank_mask:0x0
// GFX11: :[[@LINE-1]]:26: error: not a valid operand.

v_pk_fmac_f16 v5, v1, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: :[[@LINE-1]]:26: error: not a valid operand.

v_pk_fmac_f16_dpp v0, v1, v2 quad_perm:[1,2,3,0]
// GFX11: :[[@LINE-1]]:1: error: dpp variant of this instruction is not supported

v_pk_fmac_f16_dpp v5, v1, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: :[[@LINE-1]]:1: error: dpp variant of this instruction is not supported

v_sub_f16_dpp v255, v1, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: :[[@LINE-1]]:1: error: operands are not valid for this GPU or mode

Expand Down
20 changes: 20 additions & 0 deletions llvm/test/MC/AMDGPU/gfx12_asm_vop2_err.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --unique --sort --version 5
// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx1200 %s 2>&1 | FileCheck --check-prefix=GFX12 --implicit-check-not=error: %s

v_pk_fmac_f16 v0, v1, v2 quad_perm:[1,2,3,0]
// GFX12: :[[@LINE-1]]:26: error: not a valid operand.

v_pk_fmac_f16 v0, v1, v2 quad_perm:[1,2,3,0] row_mask:0x0 bank_mask:0x0
// GFX12: :[[@LINE-1]]:26: error: not a valid operand.

v_pk_fmac_f16 v5, v1, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX12: :[[@LINE-1]]:26: error: not a valid operand.

v_pk_fmac_f16_dpp v0, v1, v2 quad_perm:[1,2,3,0]
// GFX12: :[[@LINE-1]]:1: error: dpp variant of this instruction is not supported

v_pk_fmac_f16_dpp v0, v1, v2 quad_perm:[1,2,3,0] row_mask:0x0 bank_mask:0x0
// GFX12: :[[@LINE-1]]:1: error: dpp variant of this instruction is not supported

v_pk_fmac_f16_dpp v5, v1, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX12: :[[@LINE-1]]:1: error: dpp variant of this instruction is not supported
Loading