336 changes: 168 additions & 168 deletions llvm/test/MC/AMDGPU/gfx11_asm_vop1_t16_err.s

Large diffs are not rendered by default.

156 changes: 78 additions & 78 deletions llvm/test/MC/AMDGPU/gfx11_asm_vop2_t16_err.s
Original file line number Diff line number Diff line change
Expand Up @@ -2,236 +2,236 @@
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1100 -mattr=-wavefrontsize32,+wavefrontsize64 -show-encoding %s 2>&1 | FileCheck --check-prefix=GFX11 --implicit-check-not=error %s

v_add_f16_e32 v255, v1, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmaak_f16_e32 v255, v1, v2, 0xfe0b
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmac_f16_e32 v255, v1, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmamk_f16_e32 v255, v1, 0xfe0b, v3
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_ldexp_f16_e32 v255, v1, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_max_f16_e32 v255, v1, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_min_f16_e32 v255, v1, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_mul_f16_e32 v255, v1, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_sub_f16_e32 v255, v1, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_subrev_f16_e32 v255, v1, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_add_f16_e32 v5, v255, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmaak_f16_e32 v5, v255, v2, 0xfe0b
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmac_f16_e32 v5, v255, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmamk_f16_e32 v5, v255, 0xfe0b, v3
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_ldexp_f16_e32 v5, v255, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_max_f16_e32 v5, v255, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_min_f16_e32 v5, v255, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_mul_f16_e32 v5, v255, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_sub_f16_e32 v5, v255, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_subrev_f16_e32 v5, v255, v2
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_add_f16_e32 v5, v1, v255
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmaak_f16_e32 v5, v1, v255, 0xfe0b
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmac_f16_e32 v5, v1, v255
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmamk_f16_e32 v5, v1, 0xfe0b, v255
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_ldexp_f16_e32 v5, v1, v255
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_max_f16_e32 v5, v1, v255
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_min_f16_e32 v5, v1, v255
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_mul_f16_e32 v5, v1, v255
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_sub_f16_e32 v5, v1, v255
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_subrev_f16_e32 v5, v1, v255
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_add_f16_dpp v255, v1, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmac_f16_dpp v255, v1, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_ldexp_f16_dpp v255, v1, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_max_f16_dpp v255, v1, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_min_f16_dpp v255, v1, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_mul_f16_dpp v255, v1, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_sub_f16_dpp v255, v1, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_subrev_f16_dpp v255, v1, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_add_f16_dpp v5, v255, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmac_f16_dpp v5, v255, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_ldexp_f16_dpp v5, v255, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_max_f16_dpp v5, v255, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_min_f16_dpp v5, v255, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_mul_f16_dpp v5, v255, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_sub_f16_dpp v5, v255, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_subrev_f16_dpp v5, v255, v2 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_add_f16_dpp v5, v1, v255 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmac_f16_dpp v5, v1, v255 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_ldexp_f16_dpp v5, v1, v255 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_max_f16_dpp v5, v1, v255 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_min_f16_dpp v5, v1, v255 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_mul_f16_dpp v5, v1, v255 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_sub_f16_dpp v5, v1, v255 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_subrev_f16_dpp v5, v1, v255 quad_perm:[3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

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

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

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

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

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

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

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

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

v_add_f16_dpp v5, v255, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmac_f16_dpp v5, v255, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_ldexp_f16_dpp v5, v255, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_max_f16_dpp v5, v255, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_min_f16_dpp v5, v255, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_mul_f16_dpp v5, v255, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

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

v_subrev_f16_dpp v5, v255, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_add_f16_dpp v5, v1, v255 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_fmac_f16_dpp v5, v1, v255 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_ldexp_f16_dpp v5, v1, v255 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_max_f16_dpp v5, v1, v255 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_min_f16_dpp v5, v1, v255 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_mul_f16_dpp v5, v1, v255 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

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

v_subrev_f16_dpp v5, v1, v255 dpp8:[7,6,5,4,3,2,1,0]
// GFX11: error: operands are not valid for this GPU or mode
// GFX11: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

1,314 changes: 657 additions & 657 deletions llvm/test/MC/AMDGPU/gfx11_asm_vopc_t16_err.s

Large diffs are not rendered by default.

360 changes: 180 additions & 180 deletions llvm/test/MC/AMDGPU/gfx11_asm_vopcx_t16_err.s

Large diffs are not rendered by default.

104 changes: 52 additions & 52 deletions llvm/test/MC/AMDGPU/gfx11_asm_vopd_err.s

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions llvm/test/MC/AMDGPU/gfx7_err_pos.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@
// cache policy is not supported for SMRD instructions

s_load_dword s1, s[2:3], 0xfc glc slc
// CHECK: error: cache policy is not supported for SMRD instructions
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: cache policy is not supported for SMRD instructions
// CHECK-NEXT:{{^}}s_load_dword s1, s[2:3], 0xfc glc slc
// CHECK-NEXT:{{^}} ^

s_load_dword s1, s[2:3], 0xfc slc
// CHECK: error: cache policy is not supported for SMRD instructions
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: cache policy is not supported for SMRD instructions
// CHECK-NEXT:{{^}}s_load_dword s1, s[2:3], 0xfc slc
// CHECK-NEXT:{{^}} ^

//==============================================================================
// d16 modifier is not supported on this GPU

image_gather4 v[5:6], v1, s[8:15], s[12:15] dmask:0x1 d16
// CHECK: error: d16 modifier is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: d16 modifier is not supported on this GPU
// CHECK-NEXT:{{^}}image_gather4 v[5:6], v1, s[8:15], s[12:15] dmask:0x1 d16
// CHECK-NEXT:{{^}} ^

//==============================================================================
// integer clamping is not supported on this GPU

v_add_co_u32 v84, s[4:5], v13, v31 clamp
// CHECK: error: integer clamping is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: integer clamping is not supported on this GPU
// CHECK-NEXT:{{^}}v_add_co_u32 v84, s[4:5], v13, v31 clamp
// CHECK-NEXT:{{^}} ^

//==============================================================================
// literal operands are not supported

v_and_b32_e64 v0, 0.159154943091895317852646485335, v1
// CHECK: error: literal operands are not supported
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// CHECK-NEXT:{{^}}v_and_b32_e64 v0, 0.159154943091895317852646485335, v1
// CHECK-NEXT:{{^}} ^
2,122 changes: 1,061 additions & 1,061 deletions llvm/test/MC/AMDGPU/gfx7_unsupported.s

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions llvm/test/MC/AMDGPU/gfx8_err_pos.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,48 @@
// a16 modifier is not supported on this GPU

image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x1 a16
// CHECK: error: a16 modifier is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: a16 modifier is not supported on this GPU
// CHECK-NEXT:{{^}}image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x1 a16
// CHECK-NEXT:{{^}} ^

image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x1 noa16
// CHECK: error: a16 modifier is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: a16 modifier is not supported on this GPU
// CHECK-NEXT:{{^}}image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x1 noa16
// CHECK-NEXT:{{^}} ^

//==============================================================================
// expected a 20-bit unsigned offset

s_atc_probe 0x7, s[4:5], -1
// CHECK: error: expected a 20-bit unsigned offset
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a 20-bit unsigned offset
// CHECK-NEXT:{{^}}s_atc_probe 0x7, s[4:5], -1
// CHECK-NEXT:{{^}} ^

s_store_dword s1, s[2:3], 0xFFFFFFFFFFF00000
// CHECK: error: expected a 20-bit unsigned offset
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a 20-bit unsigned offset
// CHECK-NEXT:{{^}}s_store_dword s1, s[2:3], 0xFFFFFFFFFFF00000
// CHECK-NEXT:{{^}} ^

//==============================================================================
// flat offset modifier is not supported on this GPU

flat_atomic_add v[3:4], v5 inst_offset:8 slc
// CHECK: error: flat offset modifier is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: flat offset modifier is not supported on this GPU
// CHECK-NEXT:{{^}}flat_atomic_add v[3:4], v5 inst_offset:8 slc
// CHECK-NEXT:{{^}} ^

//==============================================================================
// image data size does not match dmask and tfe

image_gather4 v[5:6], v1, s[8:15], s[12:15] dmask:0x1 d16
// CHECK: error: image data size does not match dmask and tfe
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: image data size does not match dmask and tfe
// CHECK-NEXT:{{^}}image_gather4 v[5:6], v1, s[8:15], s[12:15] dmask:0x1 d16
// CHECK-NEXT:{{^}}^

//==============================================================================
// not a valid operand

v_cndmask_b32_sdwa v5, v1, sext(v2), vcc dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:BYTE_0 src1_sel:WORD_0
// CHECK: error: not a valid operand.
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.
// CHECK-NEXT:{{^}}v_cndmask_b32_sdwa v5, v1, sext(v2), vcc dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:BYTE_0 src1_sel:WORD_0
// CHECK-NEXT:{{^}} ^
1,240 changes: 620 additions & 620 deletions llvm/test/MC/AMDGPU/gfx8_unsupported.s

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions llvm/test/MC/AMDGPU/gfx9-asm-err.s
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck -check-prefix=GFX9ERR --implicit-check-not=error: %s

v_cvt_f16_u16_e64 v5, 0.5
// GFX9ERR: error: literal operands are not supported
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_cvt_f16_u16_e64 v5, -4.0
// GFX9ERR: error: literal operands are not supported
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_add_u16_e64 v5, v1, 0.5
// GFX9ERR: error: literal operands are not supported
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_add_u16_e64 v5, v1, -4.0
// GFX9ERR: error: literal operands are not supported
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_cvt_f16_i16_e64 v5, 0.5
// GFX9ERR: error: literal operands are not supported
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_cvt_f16_i16_e64 v5, -4.0
// GFX9ERR: error: literal operands are not supported
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_add_u16_e64 v5, 0.5, v2
// GFX9ERR: error: literal operands are not supported
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_add_u16_e64 v5, -4.0, v2
// GFX9ERR: error: literal operands are not supported
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_subrev_u16_e64 v5, v1, 0.5
// GFX9ERR: error: literal operands are not supported
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_subrev_u16_e64 v5, v1, -4.0
// GFX9ERR: error: literal operands are not supported
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_cvt_u32_f64 v5, v[0:1] quad_perm:[0,2,1,1] row_mask:0xf bank_mask:0xf
// GFX9ERR: error: not a valid operand.
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.

global_load_lds_dword v[2:3], off
// GFX9ERR: error: instruction not supported on this GPU
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

global_load_dword v[2:3], off
// GFX9ERR: error: too few operands for instruction
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction

scratch_load_dword v2, off, offset:256
// GFX9ERR: error: too few operands for instruction
// GFX9ERR: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction
4 changes: 2 additions & 2 deletions llvm/test/MC/AMDGPU/gfx9-vop2be-literal.s
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck -check-prefix=GFX9-ERR --implicit-check-not=error: %s

v_addc_co_u32_e32 v3, vcc, 12345, v3, vcc
// GFX9-ERR: error: invalid operand (violates constant bus restrictions)
// GFX9-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)

v_cndmask_b32 v0, 12345, v1, vcc
// GFX9-ERR: error: invalid operand (violates constant bus restrictions)
// GFX9-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)
10 changes: 5 additions & 5 deletions llvm/test/MC/AMDGPU/gfx908_err_pos.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,38 @@
// inline constants are not allowed for this operand

v_mfma_f32_32x32x1f32 a[0:31], v0, v1, 0
// CHECK: error: inline constants are not allowed for this operand
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: inline constants are not allowed for this operand
// CHECK-NEXT:{{^}}v_mfma_f32_32x32x1f32 a[0:31], v0, v1, 0
// CHECK-NEXT:{{^}} ^

//==============================================================================
// invalid neg_hi value

v_dot2_f32_f16 v0, v1, v2, v3 neg_hi:[0,2]
// CHECK: error: invalid neg_hi value
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid neg_hi value
// CHECK-NEXT:{{^}}v_dot2_f32_f16 v0, v1, v2, v3 neg_hi:[0,2]
// CHECK-NEXT:{{^}} ^

//==============================================================================
// invalid neg_lo value

v_dot2_f32_f16 v0, v1, v2, v3 neg_lo:[2,0]
// CHECK: error: invalid neg_lo value
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid neg_lo value
// CHECK-NEXT:{{^}}v_dot2_f32_f16 v0, v1, v2, v3 neg_lo:[2,0]
// CHECK-NEXT:{{^}} ^

//==============================================================================
// invalid op_sel_hi value

v_dot2_f32_f16 v0, v1, v2, v3 op_sel_hi:[2,0]
// CHECK: error: invalid op_sel_hi value
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid op_sel_hi value
// CHECK-NEXT:{{^}}v_dot2_f32_f16 v0, v1, v2, v3 op_sel_hi:[2,0]
// CHECK-NEXT:{{^}} ^

//==============================================================================
// source operand must be either a VGPR or an inline constant

v_accvgpr_write a2, execz
// CHECK: error: source operand must be either a VGPR or an inline constant
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: source operand must be either a VGPR or an inline constant
// CHECK-NEXT:{{^}}v_accvgpr_write a2, execz
// CHECK-NEXT:{{^}} ^
468 changes: 234 additions & 234 deletions llvm/test/MC/AMDGPU/gfx90a_asm_features.s

Large diffs are not rendered by default.

196 changes: 98 additions & 98 deletions llvm/test/MC/AMDGPU/gfx90a_err.s

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions llvm/test/MC/AMDGPU/gfx90a_err_pos.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
// vgpr must be even aligned

ds_gws_init a1 offset:65535 gds
// CHECK: error: vgpr must be even aligned
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: vgpr must be even aligned
// CHECK-NEXT:{{^}}ds_gws_init a1 offset:65535 gds
// CHECK-NEXT:{{^}} ^

v_mfma_f64_16x16x4f64 v[0:7], v[0:1], v[2:3], v[2:9]
// CHECK: error: source 2 operand must not partially overlap with dst
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: source 2 operand must not partially overlap with dst
// CHECK-NEXT:{{^}}v_mfma_f64_16x16x4f64 v[0:7], v[0:1], v[2:3], v[2:9]
// CHECK-NEXT:{{^}} ^
5,572 changes: 2,786 additions & 2,786 deletions llvm/test/MC/AMDGPU/gfx90a_ldst_acc.s

Large diffs are not rendered by default.

282 changes: 141 additions & 141 deletions llvm/test/MC/AMDGPU/gfx940_asm_features.s

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions llvm/test/MC/AMDGPU/gfx940_err.s
Original file line number Diff line number Diff line change
@@ -1,127 +1,127 @@
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx940 %s 2>&1 | FileCheck --check-prefix=GFX940 --implicit-check-not=error: %s

v_mac_f32 v0, v1, v2
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mac_f32_e64 v5, v1, v2
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mac_f32_dpp v5, v1, v2 quad_perm:[0,1,2,3] row_mask:0xf bank_mask:0xf
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mac_f32_dpp v5, v1, v2 dpp8:[7,6,5,4,3,2,1,0]
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mac_f32_sdwa v5, v1, v2 dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:DWORD src1_sel:DWORD
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_f32 v0, v1, v2, v3
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_madak_f32 v0, v1, v2, 0
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_madmk_f32 v0, v1, 0, v2
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_legacy_f32 v0, v1, v2, v3
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mov_b64 v[2:3], v[4:5] row_shl:1
// GFX940: error: 64 bit dpp only supports row_newbcast
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: 64 bit dpp only supports row_newbcast

v_mov_b64 v[2:3], -v[4:5]
// GFX940: error: not a valid operand.
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.

v_mov_b64 v[2:3], |v[4:5]|
// GFX940: error: not a valid operand.
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.

v_mov_b64 v[2:3], v[4:5] dst_sel:BYTE_0 dst_unused:UNUSED_PRESERVE src0_sel:DWORD
// GFX940: error: not a valid operand.
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.

v_mov_b64_sdwa v[2:3], v[4:5]
// GFX940: error: sdwa variant of this instruction is not supported
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: sdwa variant of this instruction is not supported

buffer_invl2
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

global_load_dword v2, v[2:3], off glc
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

global_load_dword v2, v[2:3], off slc
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

global_load_dword v2, v[2:3], off scc
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

s_load_dword s2, s[2:3], 0x0 sc0
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

buffer_atomic_swap v5, off, s[8:11], s3 glc
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

buffer_atomic_swap v5, off, s[8:11], s3 slc
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

buffer_wbl2 glc
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

buffer_wbl2 scc
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_dot2_u32_u16 v0, 1, v0, s2 op_sel:[0,1,0,1] op_sel_hi:[0,0,1,1]
// GFX940: error: invalid op_sel operand
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid op_sel operand

v_cvt_f32_fp8 v1, sext(v3) src0_sel:BYTE_1
// GFX940: error: not a valid operand.
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.

v_cvt_pk_f32_bf8 v[2:3], sext(v3) src0_sel:BYTE_1
// GFX940: error: not a valid operand.
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.

v_cvt_sr_bf8_f32 v1, v2, -v3
// GFX940: error: not a valid operand.
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.

v_cvt_sr_fp8_f32 v1, v2, -v3
// GFX940: error: not a valid operand.
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.

v_cvt_sr_fp8_f32 v1, v2, v3 clamp
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_cvt_sr_fp8_f32 v1, v2, v3 mul:2
// GFX940: error: not a valid operand.
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.

v_cvt_pk_fp8_f32 v1, v2, v3 clamp
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_cvt_pk_fp8_f32 v1, v2, v3 mul:2
// GFX940: error: not a valid operand.
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.

s_getreg_b32 s1, hwreg(HW_REG_FLAT_SCR_LO)
// GFX940: error: specified hardware register is not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: specified hardware register is not supported on this GPU

s_getreg_b32 s1, hwreg(HW_REG_FLAT_SCR_HI)
// GFX940: error: specified hardware register is not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: specified hardware register is not supported on this GPU

s_getreg_b32 s1, hwreg(HW_REG_XNACK_MASK)
// GFX940: error: specified hardware register is not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: specified hardware register is not supported on this GPU

s_getreg_b32 s1, hwreg(HW_REG_HW_ID1)
// GFX940: error: specified hardware register is not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: specified hardware register is not supported on this GPU

s_getreg_b32 s1, hwreg(HW_REG_HW_ID2)
// GFX940: error: specified hardware register is not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: specified hardware register is not supported on this GPU

s_getreg_b32 s1, hwreg(HW_REG_POPS_PACKER)
// GFX940: error: specified hardware register is not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: specified hardware register is not supported on this GPU

ds_ordered_count v5, v1 offset:65535 gds
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

exp pos0 v3, v2, v1, v0
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

global_load_dword v[2:3], off lds
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

scratch_load_dword v2, off lds
// GFX940: error: invalid operand for instruction
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
4 changes: 2 additions & 2 deletions llvm/test/MC/AMDGPU/gfx940_err_pos.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
// instruction must not use sc0

global_atomic_or v[0:1], v2, off sc1 nt sc0
// CHECK: error: instruction must not use sc0
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction must not use sc0
// CHECK-NEXT:{{^}}global_atomic_or v[0:1], v2, off sc1 nt sc0
// CHECK-NEXT:{{^}} ^

global_atomic_or v[0:1], v2, off sc0 sc1 nt
// CHECK: error: instruction must not use sc0
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: instruction must not use sc0
// CHECK-NEXT:{{^}}global_atomic_or v[0:1], v2, off sc0 sc1 nt
// CHECK-NEXT:{{^}} ^
70 changes: 35 additions & 35 deletions llvm/test/MC/AMDGPU/gfx9_err_pos.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,242 +4,242 @@
// 'null' operand is not supported on this GPU

s_add_u32 null, null, null
// CHECK: error: 'null' operand is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: 'null' operand is not supported on this GPU
// CHECK-NEXT:{{^}}s_add_u32 null, null, null
// CHECK-NEXT:{{^}} ^

//==============================================================================
// ABS not allowed in VOP3B instructions

v_div_scale_f64 v[24:25], vcc, -|v[22:23]|, v[22:23], v[20:21]
// CHECK: error: ABS not allowed in VOP3B instructions
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: ABS not allowed in VOP3B instructions
// CHECK-NEXT:{{^}}v_div_scale_f64 v[24:25], vcc, -|v[22:23]|, v[22:23], v[20:21]
// CHECK-NEXT:{{^}}^

//==============================================================================
// dlc modifier is not supported on this GPU

scratch_load_ubyte v1, v2, off dlc
// CHECK: error: dlc modifier is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: dlc modifier is not supported on this GPU
// CHECK-NEXT:{{^}}scratch_load_ubyte v1, v2, off dlc
// CHECK-NEXT:{{^}} ^

scratch_load_ubyte v1, v2, off nodlc
// CHECK: error: dlc modifier is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: dlc modifier is not supported on this GPU
// CHECK-NEXT:{{^}}scratch_load_ubyte v1, v2, off nodlc
// CHECK-NEXT:{{^}} ^

//==============================================================================
// duplicate VGPR index mode

s_set_gpr_idx_on s0, gpr_idx(SRC0,DST,SRC1,DST)
// CHECK: error: duplicate VGPR index mode
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: duplicate VGPR index mode
// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx(SRC0,DST,SRC1,DST)
// CHECK-NEXT:{{^}} ^

//==============================================================================
// exp target is not supported on this GPU

exp pos4 v4, v3, v2, v1
// CHECK: error: exp target is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: exp target is not supported on this GPU
// CHECK-NEXT:{{^}}exp pos4 v4, v3, v2, v1
// CHECK-NEXT:{{^}} ^

//==============================================================================
// expected a 12-bit unsigned offset

flat_load_dword v1, v[3:4] offset:-1
// CHECK: error: expected a 12-bit unsigned offset
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a 12-bit unsigned offset
// CHECK-NEXT:{{^}}flat_load_dword v1, v[3:4] offset:-1
// CHECK-NEXT:{{^}} ^

flat_load_dword v1, v[3:4] offset:4096
// CHECK: error: expected a 12-bit unsigned offset
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a 12-bit unsigned offset
// CHECK-NEXT:{{^}}flat_load_dword v1, v[3:4] offset:4096
// CHECK-NEXT:{{^}} ^

//==============================================================================
// expected a 13-bit signed offset

global_load_dword v1, v[3:4] off, offset:-4097
// CHECK: error: expected a 13-bit signed offset
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a 13-bit signed offset
// CHECK-NEXT:{{^}}global_load_dword v1, v[3:4] off, offset:-4097
// CHECK-NEXT:{{^}} ^

//==============================================================================
// expected a VGPR index mode

s_set_gpr_idx_on s0, gpr_idx(SRC0,
// CHECK: error: expected a VGPR index mode
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a VGPR index mode
// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx(SRC0,
// CHECK-NEXT:{{^}} ^

//==============================================================================
// expected a VGPR index mode or a closing parenthesis

s_set_gpr_idx_on s0, gpr_idx(
// CHECK: error: expected a VGPR index mode or a closing parenthesis
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a VGPR index mode or a closing parenthesis
// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx(
// CHECK-NEXT:{{^}} ^

s_set_gpr_idx_on s0, gpr_idx(X)
// CHECK: error: expected a VGPR index mode or a closing parenthesis
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a VGPR index mode or a closing parenthesis
// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx(X)
// CHECK-NEXT:{{^}} ^

//==============================================================================
// expected a comma or a closing parenthesis

s_set_gpr_idx_on s0, gpr_idx(DST
// CHECK: error: expected a comma or a closing parenthesis
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected a comma or a closing parenthesis
// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx(DST
// CHECK-NEXT:{{^}} ^

//==============================================================================
// expected absolute expression

s_set_gpr_idx_on s0, gpr_idx
// CHECK: error: expected absolute expression
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected absolute expression
// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, gpr_idx
// CHECK-NEXT:{{^}} ^

s_set_gpr_idx_on s0, s1
// CHECK: error: expected absolute expression
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: expected absolute expression
// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, s1
// CHECK-NEXT:{{^}} ^

//==============================================================================
// invalid atomic image dmask

image_atomic_add v252, v2, s[8:15]
// CHECK: error: invalid atomic image dmask
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid atomic image dmask
// CHECK-NEXT:{{^}}image_atomic_add v252, v2, s[8:15]
// CHECK-NEXT:{{^}}^

image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xe tfe
// CHECK: error: invalid atomic image dmask
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid atomic image dmask
// CHECK-NEXT:{{^}}image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xe tfe
// CHECK-NEXT:{{^}} ^

//==============================================================================
// invalid image_gather dmask: only one bit must be set

image_gather4_cl v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x3
// CHECK: error: invalid image_gather dmask: only one bit must be set
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid image_gather dmask: only one bit must be set
// CHECK-NEXT:{{^}}image_gather4_cl v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x3
// CHECK-NEXT:{{^}} ^

//==============================================================================
// invalid immediate: only 4-bit values are legal

s_set_gpr_idx_on s0, 16
// CHECK: error: invalid immediate: only 4-bit values are legal
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid immediate: only 4-bit values are legal
// CHECK-NEXT:{{^}}s_set_gpr_idx_on s0, 16
// CHECK-NEXT:{{^}} ^

//==============================================================================
// invalid operand (violates constant bus restrictions)

v_add_f32_e64 v0, flat_scratch_hi, m0
// CHECK: error: invalid operand (violates constant bus restrictions)
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)
// CHECK-NEXT:{{^}}v_add_f32_e64 v0, flat_scratch_hi, m0
// CHECK-NEXT:{{^}} ^

v_madak_f32 v5, s1, v2, 0xa1b1c1d1
// CHECK: error: invalid operand (violates constant bus restrictions)
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)
// CHECK-NEXT:{{^}}v_madak_f32 v5, s1, v2, 0xa1b1c1d1
// CHECK-NEXT:{{^}} ^

v_madmk_f32 v5, s1, 0x11213141, v255
// CHECK: error: invalid operand (violates constant bus restrictions)
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand (violates constant bus restrictions)
// CHECK-NEXT:{{^}}v_madmk_f32 v5, s1, 0x11213141, v255
// CHECK-NEXT:{{^}} ^

//==============================================================================
// literal operands are not supported

v_bfe_u32 v0, v2, v3, undef
// CHECK: error: literal operands are not supported
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// CHECK-NEXT:{{^}}v_bfe_u32 v0, v2, v3, undef
// CHECK-NEXT:{{^}} ^

v_bfe_u32 v0, v2, undef, v3
// CHECK: error: literal operands are not supported
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// CHECK-NEXT:{{^}}v_bfe_u32 v0, v2, undef, v3
// CHECK-NEXT:{{^}} ^

v_add_i16 v5, v1, 0.5
// CHECK: error: literal operands are not supported
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// CHECK-NEXT:{{^}}v_add_i16 v5, v1, 0.5
// CHECK-NEXT:{{^}} ^

v_add_i16 v5, 0.5, v2
// CHECK: error: literal operands are not supported
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// CHECK-NEXT:{{^}}v_add_i16 v5, 0.5, v2
// CHECK-NEXT:{{^}} ^

//==============================================================================
// too few operands for instruction

buffer_load_dword off, s[8:11], s3
// CHECK: error: too few operands for instruction
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction
// CHECK-NEXT:{{^}}buffer_load_dword off, s[8:11], s3
// CHECK-NEXT:{{^}}^

buffer_load_dword off, s[8:11], s3 offset:1
// CHECK: error: too few operands for instruction
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: too few operands for instruction
// CHECK-NEXT:{{^}}buffer_load_dword off, s[8:11], s3 offset:1
// CHECK-NEXT:{{^}}^

//==============================================================================
// r128 modifier is not supported on this GPU

image_atomic_add v10, v6, s[8:15] dmask:0x1 r128
// CHECK: error: r128 modifier is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: r128 modifier is not supported on this GPU
// CHECK-NEXT:{{^}}image_atomic_add v10, v6, s[8:15] dmask:0x1 r128
// CHECK-NEXT:{{^}} ^

image_atomic_add v10, v6, s[8:15] dmask:0x1 nor128
// CHECK: error: r128 modifier is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: r128 modifier is not supported on this GPU
// CHECK-NEXT:{{^}}image_atomic_add v10, v6, s[8:15] dmask:0x1 nor128
// CHECK-NEXT:{{^}} ^

//==============================================================================
// unified format is not supported on this GPU

tbuffer_store_format_xyzw v[1:4], v1, s[4:7], s0 format:[BUF_FMT_8_SNORM,BUF_DATA_FORMAT_8] idxen
// CHECK: error: unified format is not supported on this GPU
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: unified format is not supported on this GPU
// CHECK-NEXT:{{^}}tbuffer_store_format_xyzw v[1:4], v1, s[4:7], s0 format:[BUF_FMT_8_SNORM,BUF_DATA_FORMAT_8] idxen
// CHECK-NEXT:{{^}} ^

//==============================================================================
// duplicate format

tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7], dfmt:1 s0 format:[BUF_NUM_FORMAT_FLOAT]
// CHECK: error: duplicate format
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: duplicate format
// CHECK-NEXT:{{^}}tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7], dfmt:1 s0 format:[BUF_NUM_FORMAT_FLOAT]
// CHECK-NEXT:{{^}} ^

//==============================================================================
// not a valid operand

v_cndmask_b32_sdwa v5, sext(v1), v2, vcc dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:BYTE_0 src1_sel:WORD_0
// CHECK: error: not a valid operand.
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: not a valid operand.
// CHECK-NEXT:{{^}}v_cndmask_b32_sdwa v5, sext(v1), v2, vcc dst_sel:DWORD dst_unused:UNUSED_PRESERVE src0_sel:BYTE_0 src1_sel:WORD_0
// CHECK-NEXT:{{^}} ^

//==============================================================================
// out of range dfmt

tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7] dfmt:16 nfmt:1 s0
// CHECK: error: out of range dfmt
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: out of range dfmt
// CHECK-NEXT:{{^}}tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7] dfmt:16 nfmt:1 s0
// CHECK-NEXT:{{^}} ^

//==============================================================================
// out of range nfmt

tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7] dfmt:1 nfmt:-1 s0
// CHECK: error: out of range nfmt
// CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: out of range nfmt
// CHECK-NEXT:{{^}}tbuffer_store_format_xyzw v[1:4], off, ttmp[4:7] dfmt:1 nfmt:-1 s0
// CHECK-NEXT:{{^}} ^
716 changes: 358 additions & 358 deletions llvm/test/MC/AMDGPU/gfx9_unsupported.s

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions llvm/test/MC/AMDGPU/lds_direct-err.s
Original file line number Diff line number Diff line change
Expand Up @@ -5,77 +5,77 @@
//---------------------------------------------------------------------------//

s_and_b32 s2, lds_direct, s1
// NOGFX9: error: invalid operand for instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

//---------------------------------------------------------------------------//
// lds_direct may not be used with "REV" opcodes
//---------------------------------------------------------------------------//

v_ashrrev_i16 v0, lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_ashrrev_i32 v0, lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_lshlrev_b16 v0, lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_lshlrev_b32 v0, lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_lshrrev_b16 v0, lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_lshrrev_b32 v0, lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_pk_ashrrev_i16 v0, lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_pk_lshlrev_b16 v0, lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_pk_lshrrev_b16 v0, lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_subbrev_co_u32 v0, vcc, src_lds_direct, v0, vcc
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_subrev_co_u32 v0, vcc, src_lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_subrev_f16 v0, src_lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_subrev_u16 v0, src_lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_subrev_u32 v0, src_lds_direct, v0
// NOGFX9: error: lds_direct cannot be used with this instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

//---------------------------------------------------------------------------//
// lds_direct may not be used with v_writelane_b32 for VI/GFX9
//---------------------------------------------------------------------------//

v_writelane_b32 v0, lds_direct, s0
// NOGFX9: error: operands are not valid for this GPU or mode
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

//---------------------------------------------------------------------------//
// lds_direct cannot be used with 64-bit and larger operands
//---------------------------------------------------------------------------//

v_add_f64 v[0:1], lds_direct, v[0:1]
// NOGFX9: error: invalid operand for instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

//---------------------------------------------------------------------------//
// Only SRC0 may specify lds_direct
//---------------------------------------------------------------------------//

v_add_i32 v0, v0, lds_direct
// NOGFX9: error: lds_direct may be used as src0 only
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct may be used as src0 only

v_add_i32 lds_direct, v0, v0
// NOGFX9: error: invalid operand for instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_fma_f32 v0, v0, v0, lds_direct
// NOGFX9: error: lds_direct may be used as src0 only
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct may be used as src0 only
32 changes: 16 additions & 16 deletions llvm/test/MC/AMDGPU/lds_direct-gfx10.s
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,49 @@ v_writelane_b32 v0, lds_direct, s0
// GFX10: v_writelane_b32 v0, src_lds_direct, s0 ; encoding: [0x00,0x00,0x61,0xd7,0xfe,0x00,0x00,0x00]

v_permlane16_b32 v0, lds_direct, s0, s0
// NOGFX10: error: invalid operand for instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_permlanex16_b32 v0, lds_direct, s0, s0
// NOGFX10: error: invalid operand for instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_ashrrev_i16 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_ashrrev_i32 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_lshlrev_b16 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_lshlrev_b32 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_lshrrev_b16 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_lshrrev_b32 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_pk_ashrrev_i16 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_pk_lshlrev_b16 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_pk_lshrrev_b16 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_subrev_co_ci_u32 v0, vcc_lo, src_lds_direct, v0, vcc_lo
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_subrev_co_u32 v0, s0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_subrev_f16 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_subrev_f32 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction

v_subrev_nc_u32 v0, src_lds_direct, v0
// NOGFX10: error: lds_direct cannot be used with this instruction
// NOGFX10: :[[@LINE-1]]:{{[0-9]+}}: error: lds_direct cannot be used with this instruction
18 changes: 9 additions & 9 deletions llvm/test/MC/AMDGPU/literal16-err.s
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga %s 2>&1 | FileCheck -check-prefix=NOVI --implicit-check-not=error: %s

v_add_f16 v1, 0xfffff, v2
// NOVI: error: invalid operand for instruction
// NOVI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_add_f16 v1, 0x10000, v2
// NOVI: error: invalid operand for instruction
// NOVI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_add_f16 v1, 0xffffffffffff000f, v2
// NOVI: error: invalid operand for instruction
// NOVI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_add_f16 v1, 0x1000ffff, v2
// NOVI: error: invalid operand for instruction
// NOVI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_add_f16 v1, -32769, v2
// NOVI: error: invalid operand for instruction
// NOVI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_add_f16 v1, 65536, v2
// NOVI: error: invalid operand for instruction
// NOVI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_add_f32 v1, 4294967296, v2
// NOVI: error: invalid operand for instruction
// NOVI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_add_f32 v1, 0x0000000100000000, v2
// NOVI: error: invalid operand for instruction
// NOVI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_and_b32 v1, 0x0000000100000000, v2
// NOVI: error: invalid operand for instruction
// NOVI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
334 changes: 167 additions & 167 deletions llvm/test/MC/AMDGPU/literals.s

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions llvm/test/MC/AMDGPU/literalv216-err.s
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 %s 2>&1 | FileCheck -check-prefix=GFX10 --implicit-check-not=error: %s

v_pk_add_f16 v1, -17, v2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_add_f16 v1, 65, v2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_add_f16 v1, 64.0, v2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_add_f16 v1, -0.15915494, v2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_add_f16 v1, -0.0, v2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_add_f16 v1, -32768, v2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_add_f16 v1, 32767, v2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_add_f16 v1, 0xffffffffffff000f, v2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_add_f16 v1, 0x1000ffff, v2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_mad_i16 v5, 0x3c00, 0x4000, 0x4400
// GFX9: error: literal operands are not supported
// GFX10: error: only one unique literal operand is allowed
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed

v_pk_mad_i16 v5, 0x3c00, 0x4000, 2
// GFX9: error: literal operands are not supported
// GFX10: error: only one unique literal operand is allowed
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: :[[@LINE-2]]:{{[0-9]+}}: error: only one unique literal operand is allowed

v_pk_mad_i16 v5, 0x3c00, 3, 2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_mad_i16 v5, 3, 0x3c00, 2
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported

v_pk_mad_i16 v5, 3, 2, 0x3c00
// GFX9: error: literal operands are not supported
// GFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
66 changes: 33 additions & 33 deletions llvm/test/MC/AMDGPU/literalv216.s
Original file line number Diff line number Diff line change
Expand Up @@ -161,126 +161,126 @@ v_pk_add_f16 v1, 65535, v2
//===----------------------------------------------------------------------===//

v_pk_add_f16 v5, v1, 0x12345678
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_add_f16 v5, v1, 0x12345678 ; encoding: [0x05,0x40,0x0f,0xcc,0x01,0xff,0x01,0x18,0x78,0x56,0x34,0x12]

v_pk_add_f16 v5, 0x12345678, v2
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_add_f16 v5, 0x12345678, v2 ; encoding: [0x05,0x40,0x0f,0xcc,0xff,0x04,0x02,0x18,0x78,0x56,0x34,0x12]

v_pk_add_f16 v5, -256, v2
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_add_f16 v5, 0xffffff00, v2 ; encoding: [0x05,0x40,0x0f,0xcc,0xff,0x04,0x02,0x18,0x00,0xff,0xff,0xff]

v_pk_add_f16 v5, v1, 256
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_add_f16 v5, v1, 0x100 ; encoding: [0x05,0x40,0x0f,0xcc,0x01,0xff,0x01,0x18,0x00,0x01,0x00,0x00]

v_pk_add_u16 v5, v1, 0x12345678
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_add_u16 v5, v1, 0x12345678 ; encoding: [0x05,0x40,0x0a,0xcc,0x01,0xff,0x01,0x18,0x78,0x56,0x34,0x12]

v_pk_add_u16 v5, 0x12345678, v2
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_add_u16 v5, 0x12345678, v2 ; encoding: [0x05,0x40,0x0a,0xcc,0xff,0x04,0x02,0x18,0x78,0x56,0x34,0x12]

v_pk_add_u16 v5, -256, v2
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_add_u16 v5, 0xffffff00, v2 ; encoding: [0x05,0x40,0x0a,0xcc,0xff,0x04,0x02,0x18,0x00,0xff,0xff,0xff]

v_pk_add_u16 v5, v1, 256
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_add_u16 v5, v1, 0x100 ; encoding: [0x05,0x40,0x0a,0xcc,0x01,0xff,0x01,0x18,0x00,0x01,0x00,0x00]

v_pk_add_f16 v5, v1, 0x123456780
// NOGFX9: error: invalid operand for instruction
// NOGFX10: error: invalid operand for instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
// NOGFX10: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_pk_add_u16 v5, v1, 0x123456780
// NOGFX9: error: invalid operand for instruction
// NOGFX10: error: invalid operand for instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
// NOGFX10: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_pk_fma_f16 v5, 0xaf123456, v2, v3
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_fma_f16 v5, 0xaf123456, v2, v3 ; encoding: [0x05,0x40,0x0e,0xcc,0xff,0x04,0x0e,0x1c,0x56,0x34,0x12,0xaf]

v_pk_fma_f16 v5, v1, 0xaf123456, v3
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_fma_f16 v5, v1, 0xaf123456, v3 ; encoding: [0x05,0x40,0x0e,0xcc,0x01,0xff,0x0d,0x1c,0x56,0x34,0x12,0xaf]

v_pk_fma_f16 v5, v1, v2, 0xaf123456
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_fma_f16 v5, v1, v2, 0xaf123456 ; encoding: [0x05,0x40,0x0e,0xcc,0x01,0x05,0xfe,0x1b,0x56,0x34,0x12,0xaf]

v_pk_mad_i16 v5, 0xaf123456, v2, v3
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_mad_i16 v5, 0xaf123456, v2, v3 ; encoding: [0x05,0x40,0x00,0xcc,0xff,0x04,0x0e,0x1c,0x56,0x34,0x12,0xaf]

v_pk_mad_i16 v5, v1, 0xaf123456, v3
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_mad_i16 v5, v1, 0xaf123456, v3 ; encoding: [0x05,0x40,0x00,0xcc,0x01,0xff,0x0d,0x1c,0x56,0x34,0x12,0xaf]

v_pk_mad_i16 v5, v1, v2, 0xaf123456
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_mad_i16 v5, v1, v2, 0xaf123456 ; encoding: [0x05,0x40,0x00,0xcc,0x01,0x05,0xfe,0x1b,0x56,0x34,0x12,0xaf]

v_pk_ashrrev_i16 v5, 0x12345678, v2
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_ashrrev_i16 v5, 0x12345678, v2 ; encoding: [0x05,0x40,0x06,0xcc,0xff,0x04,0x02,0x18,0x78,0x56,0x34,0x12]

v_pk_ashrrev_i16 v5, v1, 0x12345678
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_ashrrev_i16 v5, v1, 0x12345678 ; encoding: [0x05,0x40,0x06,0xcc,0x01,0xff,0x01,0x18,0x78,0x56,0x34,0x12]

//===----------------------------------------------------------------------===//
// Floating-point literals (allowed if lossless conversion to f16 is possible)
//===----------------------------------------------------------------------===//

v_pk_add_f16 v5, v1, 0.1234
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_add_f16 v5, v1, 0x2fe6 ; encoding: [0x05,0x40,0x0f,0xcc,0x01,0xff,0x01,0x18,0xe6,0x2f,0x00,0x00]

v_pk_add_u16 v5, v1, 0.1234
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_add_u16 v5, v1, 0x2fe6 ; encoding: [0x05,0x40,0x0a,0xcc,0x01,0xff,0x01,0x18,0xe6,0x2f,0x00,0x00]

v_pk_fma_f16 v5, 0.1234, v2, v3
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_fma_f16 v5, 0x2fe6, v2, v3 ; encoding: [0x05,0x40,0x0e,0xcc,0xff,0x04,0x0e,0x1c,0xe6,0x2f,0x00,0x00]

v_pk_fma_f16 v5, v1, 0.1234, v3
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_fma_f16 v5, v1, 0x2fe6, v3 ; encoding: [0x05,0x40,0x0e,0xcc,0x01,0xff,0x0d,0x1c,0xe6,0x2f,0x00,0x00]

v_pk_fma_f16 v5, v1, v2, 0.1234
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_fma_f16 v5, v1, v2, 0x2fe6 ; encoding: [0x05,0x40,0x0e,0xcc,0x01,0x05,0xfe,0x1b,0xe6,0x2f,0x00,0x00]

v_pk_mad_i16 v5, 0.1234, v2, v3
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_mad_i16 v5, 0x2fe6, v2, v3 ; encoding: [0x05,0x40,0x00,0xcc,0xff,0x04,0x0e,0x1c,0xe6,0x2f,0x00,0x00]

v_pk_mad_i16 v5, v1, 0.1234, v3
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_mad_i16 v5, v1, 0x2fe6, v3 ; encoding: [0x05,0x40,0x00,0xcc,0x01,0xff,0x0d,0x1c,0xe6,0x2f,0x00,0x00]

v_pk_mad_i16 v5, v1, v2, 0.1234
// NOGFX9: error: literal operands are not supported
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: literal operands are not supported
// GFX10: v_pk_mad_i16 v5, v1, v2, 0x2fe6 ; encoding: [0x05,0x40,0x00,0xcc,0x01,0x05,0xfe,0x1b,0xe6,0x2f,0x00,0x00]

v_pk_add_f16 v5, v1, 123456.0
// NOGFX9: error: invalid operand for instruction
// NOGFX10: error: invalid operand for instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
// NOGFX10: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

v_pk_add_u16 v5, v1, 123456.0
// NOGFX9: error: invalid operand for instruction
// NOGFX10: error: invalid operand for instruction
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction
// NOGFX10: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction

//===----------------------------------------------------------------------===//
// Packed VOP2
//===----------------------------------------------------------------------===//

// FIXME: v_pk_fmac_f16 cannot be promoted to VOP3 so '_e32' suffix is not valid
v_pk_fmac_f16 v5, 0x12345678, v2
// NOGFX9: error: instruction not supported on this GPU
// NOGFX9: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU
// GFX10: v_pk_fmac_f16 v5, 0x12345678, v2 ; encoding: [0xff,0x04,0x0a,0x78,0x78,0x56,0x34,0x12]
56 changes: 28 additions & 28 deletions llvm/test/MC/AMDGPU/mad-mix.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,120 +4,120 @@

v_mad_mix_f32 v0, v1, v2, v3
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 ; encoding: [0x00,0x00,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mixlo_f16 v0, v1, v2, v3
// GFX9-MADMIX: v_mad_mixlo_f16 v0, v1, v2, v3 ; encoding: [0x00,0x00,0xa1,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mixhi_f16 v0, v1, v2, v3
// GFX9-MADMIX: v_mad_mixhi_f16 v0, v1, v2, v3 ; encoding: [0x00,0x00,0xa2,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

//
// Regular source modifiers on non-packed instructions
//

v_mad_mix_f32 v0, abs(v1), v2, v3
// GFX9-MADMIX: v_mad_mix_f32 v0, |v1|, v2, v3 ; encoding: [0x00,0x01,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, abs(v2), v3
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, |v2|, v3 ; encoding: [0x00,0x02,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, abs(v3)
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, |v3| ; encoding: [0x00,0x04,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, -v1, v2, v3
// GFX9-MADMIX: v_mad_mix_f32 v0, -v1, v2, v3 ; encoding: [0x00,0x00,0xa0,0xd3,0x01,0x05,0x0e,0x24]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, -v2, v3
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, -v2, v3 ; encoding: [0x00,0x00,0xa0,0xd3,0x01,0x05,0x0e,0x44]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, -v3
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, -v3 ; encoding: [0x00,0x00,0xa0,0xd3,0x01,0x05,0x0e,0x84]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, -abs(v1), v2, v3
// GFX9-MADMIX: v_mad_mix_f32 v0, -|v1|, v2, v3 ; encoding: [0x00,0x01,0xa0,0xd3,0x01,0x05,0x0e,0x24]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, -abs(v2), v3
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, -|v2|, v3 ; encoding: [0x00,0x02,0xa0,0xd3,0x01,0x05,0x0e,0x44]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, -abs(v3)
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, -|v3| ; encoding: [0x00,0x04,0xa0,0xd3,0x01,0x05,0x0e,0x84]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mixlo_f16 v0, abs(v1), -v2, abs(v3)
// GFX9-MADMIX: v_mad_mixlo_f16 v0, |v1|, -v2, |v3| ; encoding: [0x00,0x05,0xa1,0xd3,0x01,0x05,0x0e,0x44]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mixhi_f16 v0, -v1, abs(v2), -abs(v3)
// GFX9-MADMIX: v_mad_mixhi_f16 v0, -v1, |v2|, -|v3| ; encoding: [0x00,0x06,0xa2,0xd3,0x01,0x05,0x0e,0xa4]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mixlo_f16 v0, v1, v2, v3 clamp
// GFX9-MADMIX: v_mad_mixlo_f16 v0, v1, v2, v3 clamp ; encoding: [0x00,0x80,0xa1,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mixhi_f16 v0, v1, v2, v3 clamp
// GFX9-MADMIX: v_mad_mixhi_f16 v0, v1, v2, v3 clamp ; encoding: [0x00,0x80,0xa2,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

//
// op_sel with non-packed instructions
//

v_mad_mix_f32 v0, v1, v2, v3 op_sel:[0,0,0]
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 ; encoding: [0x00,0x00,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, v3 op_sel:[1,0,0]
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 op_sel:[1,0,0] ; encoding: [0x00,0x08,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, v3 op_sel:[0,1,0]
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 op_sel:[0,1,0] ; encoding: [0x00,0x10,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, v3 op_sel:[0,0,1]
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 op_sel:[0,0,1] ; encoding: [0x00,0x20,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, v3 op_sel:[1,1,1]
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 op_sel:[1,1,1] ; encoding: [0x00,0x38,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, v3
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 ; encoding: [0x00,0x00,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, v3 op_sel_hi:[1,0,0]
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 op_sel_hi:[1,0,0] ; encoding: [0x00,0x00,0xa0,0xd3,0x01,0x05,0x0e,0x0c]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, v3 op_sel_hi:[0,1,0]
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 op_sel_hi:[0,1,0] ; encoding: [0x00,0x00,0xa0,0xd3,0x01,0x05,0x0e,0x14]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, v3 op_sel_hi:[0,0,1]
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 op_sel_hi:[0,0,1] ; encoding: [0x00,0x40,0xa0,0xd3,0x01,0x05,0x0e,0x04]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mix_f32 v0, v1, v2, v3 op_sel_hi:[1,1,1]
// GFX9-MADMIX: v_mad_mix_f32 v0, v1, v2, v3 op_sel_hi:[1,1,1] ; encoding: [0x00,0x40,0xa0,0xd3,0x01,0x05,0x0e,0x1c]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mixlo_f16 v0, v1, v2, v3 op_sel_hi:[1,0,1] clamp
// GFX9-MADMIX: v_mad_mixlo_f16 v0, v1, v2, v3 op_sel_hi:[1,0,1] clamp ; encoding: [0x00,0xc0,0xa1,0xd3,0x01,0x05,0x0e,0x0c]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mad_mixhi_f16 v0, v1, v2, v3 op_sel_hi:[1,0,1] clamp
// GFX9-MADMIX: v_mad_mixhi_f16 v0, v1, v2, v3 op_sel_hi:[1,0,1] clamp ; encoding: [0x00,0xc0,0xa2,0xd3,0x01,0x05,0x0e,0x0c]
// GFX9-FMAMIX-ERR: error: instruction not supported on this GPU
// GFX9-FMAMIX-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU
30 changes: 15 additions & 15 deletions llvm/test/MC/AMDGPU/mai-err-gfx940.s
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx940 %s 2>&1 | FileCheck -check-prefix=GFX940 %s

v_mfma_f32_32x32x2bf16 a[0:31], v0, v1, 0
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mfma_f32_16x16x2bf16 a[0:15], v0, v1, 0
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mfma_f32_4x4x2bf16 a[0:3], v0, v1, 0
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mfma_f32_32x32x4bf16 a[0:15], v0, v1, 0
// GFX940: error: operands are not valid for this GPU or mode
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode

v_mfma_f32_16x16x8bf16 a[0:3], v0, v1, 0
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mfma_f32_32x32x1f32 a[0:31], v0, v1, a[0:31] neg:[1,0,0]
// GFX940: error: invalid modifier: neg is not supported
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid modifier: neg is not supported

v_mfma_f32_32x32x1_2b_f32 a[0:31], v0, v1, a[0:31] neg:[1,0,0]
// GFX940: error: invalid modifier: neg is not supported
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid modifier: neg is not supported

v_mfma_f64_16x16x4_f64 v[0:7], v[0:1], v[2:3], v[0:7] blgp:7
// GFX940: error: invalid modifier: blgp is not supported
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid modifier: blgp is not supported

v_mfma_f64_16x16x4f64 v[0:7], v[0:1], v[2:3], v[0:7] blgp:7
// GFX940: error: invalid modifier: blgp is not supported
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid modifier: blgp is not supported

v_mfma_f64_16x16x4_f64 a[0:7], v[0:1], v[2:3], a[0:7] blgp:7
// GFX940: error: invalid modifier: blgp is not supported
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid modifier: blgp is not supported

v_mfma_f64_4x4x4_4b_f64 v[0:1], v[0:1], a[2:3], v[2:3] blgp:7
// GFX940: error: invalid modifier: blgp is not supported
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid modifier: blgp is not supported

v_mfma_f64_4x4x4_4b_f64 a[0:1], v[0:1], a[2:3], a[2:3] blgp:7
// GFX940: error: invalid modifier: blgp is not supported
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: invalid modifier: blgp is not supported

v_mfma_i32_32x32x8i8 a[0:15], v0, v1, a[0:15]
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mfma_i32_16x16x16i8 a[0:3], v0, v1, a[0:3]
// GFX940: error: instruction not supported on this GPU
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

v_mfma_f64_16x16x4_f64 a[0:7], v[0:1], v[2:3], a[2:9]
// GFX940: error: source 2 operand must not partially overlap with dst
// GFX940: :[[@LINE-1]]:{{[0-9]+}}: error: source 2 operand must not partially overlap with dst
704 changes: 352 additions & 352 deletions llvm/test/MC/AMDGPU/mai-err.s

Large diffs are not rendered by default.

300 changes: 150 additions & 150 deletions llvm/test/MC/AMDGPU/mai-gfx940.s

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions llvm/test/MC/AMDGPU/mai.s
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ v_accvgpr_write a2, v255
// GFX908: v_accvgpr_write_b32 a2, v255 ; encoding: [0x02,0x40,0xd9,0xd3,0xff,0x01,0x00,0x18]

v_accvgpr_write a2, 100
// NOGFX908: error: invalid operand for instruction
// NOGFX908: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction

v_accvgpr_write a2, execz
// NOGFX908: error: source operand must be either a VGPR or an inline constant
// NOGFX908: :[[@LINE-1]]:{{[0-9]+}}: error: source operand must be either a VGPR or an inline constant

v_accvgpr_write a2, vccz
// NOGFX908: error: source operand must be either a VGPR or an inline constant
// NOGFX908: :[[@LINE-1]]:{{[0-9]+}}: error: source operand must be either a VGPR or an inline constant

v_accvgpr_write a2, scc
// NOGFX908: error: source operand must be either a VGPR or an inline constant
// NOGFX908: :[[@LINE-1]]:{{[0-9]+}}: error: source operand must be either a VGPR or an inline constant

v_accvgpr_write a2, shared_base
// NOGFX908: error: source operand must be either a VGPR or an inline constant
// NOGFX908: :[[@LINE-1]]:{{[0-9]+}}: error: source operand must be either a VGPR or an inline constant

v_accvgpr_write a2, pops_exiting_wave_id
// NOGFX908: error: source operand must be either a VGPR or an inline constant
// NOGFX908: :[[@LINE-1]]:{{[0-9]+}}: error: source operand must be either a VGPR or an inline constant

v_mfma_f32_32x32x1f32 a[0:31], v0, v1, a[0:31]
// GFX908: v_mfma_f32_32x32x1f32 a[0:31], v0, v1, a[0:31] ; encoding: [0x00,0x00,0xc0,0xd3,0x00,0x03,0x02,0x04]
Expand Down
52 changes: 26 additions & 26 deletions llvm/test/MC/AMDGPU/mimg-err-gfx940.s
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx940 %s 2>&1 | FileCheck %s --check-prefix=NOGFX940 --implicit-check-not=error:

image_load v[4:6], v[238:241], s[28:35] dmask:0x7 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_load_pck v5, v[0:3], s[8:15] dmask:0x1 glc
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_load_pck_sgn v5, v[0:3], s[8:15] dmask:0x1 lwe
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_load_mip v5, v[0:3], s[8:15]
// NOGFX940: error: instruction not supported on this GPU
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

image_load_mip_pck v5, v1, s[8:15] dmask:0x1
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_load_mip_pck_sgn v[4:5], v[0:3], s[8:15] dmask:0x5
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_store v[192:194], v[238:241], s[28:35] dmask:0x7 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_store_pck v1, v[2:5], s[12:19] dmask:0x1 unorm da
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_store_mip v1, v[2:5], s[12:19]
// NOGFX940: error: instruction not supported on this GPU
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error: instruction not supported on this GPU

image_store_mip_pck v252, v[2:3], s[12:19] dmask:0x1 a16
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_add v4, v192, s[28:35] dmask:0x1 unorm glc
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_and v4, v192, s[28:35] dmask:0x1 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_swap v4, v[192:195], s[28:35] dmask:0x1 unorm glc
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_cmpswap v[4:5], v[192:195], s[28:35] dmask:0x3 unorm glc
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_or v4, v192, s[28:35] dmask:0x1 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_xor v4, v192, s[28:35] dmask:0x1 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_sub v4, v192, s[28:35] dmask:0x1 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_smin v4, v192, s[28:35] dmask:0x1 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_smax v4, v192, s[28:35] dmask:0x1 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_umin v4, v192, s[28:35] dmask:0x1 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_umax v4, v192, s[28:35] dmask:0x1 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_inc v4, v192, s[28:35] dmask:0x1 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_atomic_dec v4, v192, s[28:35] dmask:0x1 unorm
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_get_resinfo v5, v1, s[8:15] dmask:0x1
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_sample v5, v[0:3], s[8:15], s[12:15] dmask:0x1
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:

image_gather4 v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x2
// NOGFX940: error:
// NOGFX940: :[[@LINE-1]]:{{[0-9]+}}: error:
32 changes: 16 additions & 16 deletions llvm/test/MC/AMDGPU/mimg-err.s
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
image_load v[4:6], v[237:240], s[28:35] dmask:0x7 tfe
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask, d16 and tfe
// NOGFX90A: error: invalid operand for instruction
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction

image_load v[4:5], v[237:240], s[28:35] dmask:0x7
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask, d16 and tfe
// NOGFX90A: error: image data size does not match dmask and d16
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask and d16

image_store v[4:7], v[237:240], s[28:35] dmask:0x7
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask, d16 and tfe
// NOGFX90A: error: image data size does not match dmask and d16
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask and d16

image_store v[4:7], v[237:240], s[28:35] dmask:0xe
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask, d16 and tfe
// NOGFX90A: error: image data size does not match dmask and d16
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask and d16

image_load v4, v[237:240], s[28:35] tfe
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask, d16 and tfe
// NOGFX90A: error: invalid operand for instruction
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction

//===----------------------------------------------------------------------===//
// Image Sample
Expand All @@ -40,17 +40,17 @@ image_load v4, v[237:240], s[28:35] tfe
image_sample v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x7 tfe
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask, d16 and tfe
// NOGFX90A: error: invalid operand for instruction
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction

image_sample v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x3
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask, d16 and tfe
// NOGFX90A: error: image data size does not match dmask and d16
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask and d16

image_sample v[193:195], v[237:240], s[28:35], s[4:7] dmask:0xf
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask, d16 and tfe
// NOGFX90A: error: image data size does not match dmask and d16
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask and d16

//===----------------------------------------------------------------------===//
// Image Atomics
Expand All @@ -59,37 +59,37 @@ image_sample v[193:195], v[237:240], s[28:35], s[4:7] dmask:0xf
image_atomic_add v252, v2, s[8:15] dmask:0x1 tfe
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask and tfe
// NOGFX90A: error: invalid operand for instruction
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction

image_atomic_add v[6:7], v255, s[8:15] dmask:0x2
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask and tfe
// NOGFX90A: error: image data size does not match dmask
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask

image_atomic_add v[6:7], v255, s[8:15] dmask:0xf
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask and tfe
// NOGFX90A: error: image data size does not match dmask
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask

image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xf tfe
// NOGCN: error: image data size does not match dmask and tfe
// NOGFX9: error: image data size does not match dmask and tfe
// NOGFX90A: error: invalid operand for instruction
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction

image_atomic_add v252, v2, s[8:15]
// NOGCN: error: invalid atomic image dmask
// NOGFX9: error: invalid atomic image dmask
// NOGFX90A: error: invalid atomic image dmask
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: invalid atomic image dmask

image_atomic_add v[6:7], v255, s[8:15] dmask:0x2 tfe
// NOGCN: error: invalid atomic image dmask
// NOGFX9: error: invalid atomic image dmask
// NOGFX90A: error: invalid operand for instruction
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction

image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xe tfe
// NOGCN: error: invalid atomic image dmask
// NOGFX9: error: invalid atomic image dmask
// NOGFX90A: error: invalid operand for instruction
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction

//===----------------------------------------------------------------------===//
// Image Gather
Expand All @@ -98,4 +98,4 @@ image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xe tfe
image_gather4_cl v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x3
// NOGCN: error: invalid image_gather dmask: only one bit must be set
// NOGFX9: error: invalid image_gather dmask: only one bit must be set
// NOGFX90A: error: instruction not supported on this GPU
// NOGFX90A: :[[@LINE-3]]:{{[0-9]+}}: error: instruction not supported on this GPU
Loading