diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp --- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp +++ b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp @@ -4353,7 +4353,7 @@ } if (NumLiterals > 1) { - Error(getLitLoc(Operands, true), "only one literal operand is allowed"); + Error(getLitLoc(Operands, true), "only one unique literal operand is allowed"); return false; } @@ -4613,7 +4613,7 @@ } if (!validateSOPLiteral(Inst)) { Error(getLitLoc(Operands), - "only one literal operand is allowed"); + "only one unique literal operand is allowed"); return false; } if (!validateVOPLiteral(Inst, Operands)) { diff --git a/llvm/test/MC/AMDGPU/expressions-gfx10.s b/llvm/test/MC/AMDGPU/expressions-gfx10.s --- a/llvm/test/MC/AMDGPU/expressions-gfx10.s +++ b/llvm/test/MC/AMDGPU/expressions-gfx10.s @@ -55,19 +55,19 @@ //===----------------------------------------------------------------------===// s_sub_u32 s0, 123, u -// NOGFX10: error: only one literal operand is allowed +// NOGFX10: error: only one unique literal operand is allowed s_sub_u32 s0, u, u -// NOGFX10: error: only one literal operand is allowed +// NOGFX10: error: only one unique literal operand is allowed s_sub_u32 s0, u, u1 -// NOGFX10: error: only one literal operand is allowed +// NOGFX10: error: only one unique literal operand is allowed v_bfe_u32 v0, v2, 123, u -// NOGFX10: error: only one literal operand is allowed +// NOGFX10: error: only one unique literal operand is allowed v_bfe_u32 v0, v2, u, u -// NOGFX10: error: only one literal operand is allowed +// NOGFX10: error: only one unique literal operand is allowed v_bfe_u32 v0, v2, u, u1 -// NOGFX10: error: only one literal operand is allowed +// NOGFX10: error: only one unique literal operand is allowed diff --git a/llvm/test/MC/AMDGPU/expressions-gfx9.s b/llvm/test/MC/AMDGPU/expressions-gfx9.s --- a/llvm/test/MC/AMDGPU/expressions-gfx9.s +++ b/llvm/test/MC/AMDGPU/expressions-gfx9.s @@ -14,13 +14,13 @@ //===----------------------------------------------------------------------===// s_sub_u32 s0, 123, u -// NOGFX9: error: only one literal operand is allowed +// NOGFX9: error: only one unique literal operand is allowed s_sub_u32 s0, u, u -// NOGFX9: error: only one literal operand is allowed +// NOGFX9: error: only one unique literal operand is allowed s_sub_u32 s0, u, u1 -// NOGFX9: error: only one literal operand is allowed +// NOGFX9: error: only one unique literal operand is allowed v_bfe_u32 v0, v2, v3, u // NOGFX9: error: literal operands are not supported diff --git a/llvm/test/MC/AMDGPU/gfx10_asm_err.s b/llvm/test/MC/AMDGPU/gfx10_asm_err.s --- a/llvm/test/MC/AMDGPU/gfx10_asm_err.s +++ b/llvm/test/MC/AMDGPU/gfx10_asm_err.s @@ -280,19 +280,19 @@ v_fmaak_f32 v0, 0xff32ff, v0, 0x11213141 // GFX6-9: error: instruction not supported on this GPU -// GFX10: error: only one literal operand is allowed +// GFX10: error: only one unique literal operand is allowed v_fmamk_f32 v0, 0xff32ff, 0x11213141, v0 // GFX6-9: error: instruction not supported on this GPU -// GFX10: error: only one literal operand is allowed +// GFX10: error: only one unique literal operand is allowed v_fmaak_f32 v0, 0xff32, v0, 0x1122 // GFX6-9: error: instruction not supported on this GPU -// GFX10: error: only one literal operand is allowed +// GFX10: error: only one unique literal operand is allowed v_fmamk_f32 v0, 0xff32, 0x1122, v0 // GFX6-9: error: instruction not supported on this GPU -// GFX10: error: only one literal operand is allowed +// GFX10: error: only one unique literal operand is allowed //===----------------------------------------------------------------------===// // VOP2 E64. diff --git a/llvm/test/MC/AMDGPU/gfx10_err_pos.s b/llvm/test/MC/AMDGPU/gfx10_err_pos.s --- a/llvm/test/MC/AMDGPU/gfx10_err_pos.s +++ b/llvm/test/MC/AMDGPU/gfx10_err_pos.s @@ -1037,50 +1037,50 @@ // CHECK-NEXT:{{^}} ^ //============================================================================== -// only one literal operand is allowed +// only one unique literal operand is allowed s_and_b32 s2, 0x12345678, 0x12345679 -// CHECK: error: only one literal operand is allowed +// CHECK: error: only one unique literal operand is allowed // CHECK-NEXT:{{^}}s_and_b32 s2, 0x12345678, 0x12345679 // CHECK-NEXT:{{^}} ^ v_add_f64 v[0:1], 1.23456, -abs(1.2345) -// CHECK: error: only one literal operand is allowed +// CHECK: error: only one unique literal operand is allowed // CHECK-NEXT:{{^}}v_add_f64 v[0:1], 1.23456, -abs(1.2345) // CHECK-NEXT:{{^}} ^ v_min3_i16 v5, 0x5678, 0x5678, 0x5679 -// CHECK: error: only one literal operand is allowed +// CHECK: error: only one unique literal operand is allowed // CHECK-NEXT:{{^}}v_min3_i16 v5, 0x5678, 0x5678, 0x5679 // CHECK-NEXT:{{^}} ^ v_pk_add_f16 v1, 25.0, 25.1 -// CHECK: error: only one literal operand is allowed +// CHECK: error: only one unique literal operand is allowed // CHECK-NEXT:{{^}}v_pk_add_f16 v1, 25.0, 25.1 // CHECK-NEXT:{{^}} ^ v_fma_mix_f32 v5, 0x7c, 0x7b, 1 -// CHECK: error: only one literal operand is allowed +// CHECK: error: only one unique literal operand is allowed // CHECK-NEXT:{{^}}v_fma_mix_f32 v5, 0x7c, 0x7b, 1 // CHECK-NEXT:{{^}} ^ v_pk_add_i16 v5, 0x7c, 0x4000 -// CHECK: error: only one literal operand is allowed +// CHECK: error: only one unique literal operand is allowed // CHECK-NEXT:{{^}}v_pk_add_i16 v5, 0x7c, 0x4000 // CHECK-NEXT:{{^}} ^ v_pk_add_i16 v5, 0x4400, 0x4000 -// CHECK: error: only one literal operand is allowed +// CHECK: error: only one unique literal operand is allowed // CHECK-NEXT:{{^}}v_pk_add_i16 v5, 0x4400, 0x4000 // CHECK-NEXT:{{^}} ^ v_bfe_u32 v0, v2, 123, undef -// CHECK: error: only one literal operand is allowed +// CHECK: error: only one unique literal operand is allowed // CHECK-NEXT:{{^}}v_bfe_u32 v0, v2, 123, undef // CHECK-NEXT:{{^}} ^ v_bfe_u32 v0, v2, undef, 123 -// CHECK: error: only one literal operand is allowed +// CHECK: error: only one unique literal operand is allowed // CHECK-NEXT:{{^}}v_bfe_u32 v0, v2, undef, 123 // CHECK-NEXT:{{^}} ^ diff --git a/llvm/test/MC/AMDGPU/gfx11_asm_vopd_errs.s b/llvm/test/MC/AMDGPU/gfx11_asm_vopd_errs.s --- a/llvm/test/MC/AMDGPU/gfx11_asm_vopd_errs.s +++ b/llvm/test/MC/AMDGPU/gfx11_asm_vopd_errs.s @@ -5,7 +5,7 @@ //===----------------------------------------------------------------------===// v_dual_mul_f32 v11, 0x24681357, v2 :: v_dual_mul_f32 v10, 0xbabe, v5 -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_mul_f32 v11, 0x24681357, v2 :: v_dual_mul_f32 v10, 0xbabe, v5 // GFX11-NEXT:{{^}} ^ @@ -15,27 +15,27 @@ //===----------------------------------------------------------------------===// v_dual_fmamk_f32 v122, v74, 0xa0172923, v161 :: v_dual_lshlrev_b32 v247, 0xbabe, v99 -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_fmamk_f32 v122, v74, 0xa0172923, v161 :: v_dual_lshlrev_b32 v247, 0xbabe, v99 // GFX11-NEXT:{{^}} ^ v_dual_add_f32 v5, 0xaf123456, v2 :: v_dual_fmaak_f32 v6, v3, v1, 0xbabe -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_add_f32 v5, 0xaf123456, v2 :: v_dual_fmaak_f32 v6, v3, v1, 0xbabe // GFX11-NEXT:{{^}} ^ v_dual_add_f32 v5, 0xaf123456, v2 :: v_dual_fmaak_f32 v6, 0xbabe, v1, 0xbabe -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_add_f32 v5, 0xaf123456, v2 :: v_dual_fmaak_f32 v6, 0xbabe, v1, 0xbabe // GFX11-NEXT:{{^}} ^ v_dual_fmamk_f32 v122, 0xdeadbeef, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, 0xdeadbeef, 0x1234, v162 -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_fmamk_f32 v122, 0xdeadbeef, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, 0xdeadbeef, 0x1234, v162 // GFX11-NEXT:{{^}} ^ v_dual_fmamk_f32 v122, 0xdeadbeef, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, s0, 0x1234, v162 -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_fmamk_f32 v122, 0xdeadbeef, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, s0, 0x1234, v162 // GFX11-NEXT:{{^}} ^ @@ -44,22 +44,22 @@ //===----------------------------------------------------------------------===// v_dual_fmamk_f32 v122, 0xdeadbeef, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, 0xdeadbeef, 0x1234, v162 -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_fmamk_f32 v122, 0xdeadbeef, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, 0xdeadbeef, 0x1234, v162 // GFX11-NEXT:{{^}} ^ v_dual_fmamk_f32 v122, 0xdeadbeef, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, 0x1234, 0xdeadbeef, v162 -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_fmamk_f32 v122, 0xdeadbeef, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, 0x1234, 0xdeadbeef, v162 // GFX11-NEXT:{{^}} ^ v_dual_fmamk_f32 v122, 0xdeadbeef, 0x1234, v161 :: v_dual_fmamk_f32 v123, 0xdeadbeef, 0xdeadbeef, v162 -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_fmamk_f32 v122, 0xdeadbeef, 0x1234, v161 :: v_dual_fmamk_f32 v123, 0xdeadbeef, 0xdeadbeef, v162 // GFX11-NEXT:{{^}} ^ v_dual_fmamk_f32 v122, 0x1234, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, 0xdeadbeef, 0xdeadbeef, v162 -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_fmamk_f32 v122, 0x1234, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, 0xdeadbeef, 0xdeadbeef, v162 // GFX11-NEXT:{{^}} ^ @@ -69,7 +69,7 @@ //===----------------------------------------------------------------------===// v_dual_fmamk_f32 v122, s0, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, s0, 0x1234, v162 -// GFX11: error: only one literal operand is allowed +// GFX11: error: only one unique literal operand is allowed // GFX11-NEXT:{{^}}v_dual_fmamk_f32 v122, s0, 0xdeadbeef, v161 :: v_dual_fmamk_f32 v123, s0, 0x1234, v162 // GFX11-NEXT:{{^}} ^ diff --git a/llvm/test/MC/AMDGPU/literals.s b/llvm/test/MC/AMDGPU/literals.s --- a/llvm/test/MC/AMDGPU/literals.s +++ b/llvm/test/MC/AMDGPU/literals.s @@ -843,18 +843,18 @@ // NOGCN: error: invalid operand (violates constant bus restrictions) v_madak_f32 v0, scc, v0, 0x11213141 -// NOGCN: error: only one literal operand is allowed +// NOGCN: error: only one unique literal operand is allowed v_madak_f32 v0, 0xff32ff, v0, 0x11213141 -// NOGCN: error: only one literal operand is allowed +// NOGCN: error: only one unique literal operand is allowed v_madmk_f32 v0, 0xff32ff, 0x11213141, v0 // NOSICI: error: instruction not supported on this GPU -// NOGFX89: error: only one literal operand is allowed +// NOGFX89: error: only one unique literal operand is allowed v_madak_f16 v0, 0xff32, v0, 0x1122 // NOSICI: error: instruction not supported on this GPU -// NOGFX89: error: only one literal operand is allowed +// NOGFX89: error: only one unique literal operand is allowed v_madmk_f16 v0, 0xff32, 0x1122, v0 // NOSICIVI: error: register not available on this GPU diff --git a/llvm/test/MC/AMDGPU/literalv216-err.s b/llvm/test/MC/AMDGPU/literalv216-err.s --- a/llvm/test/MC/AMDGPU/literalv216-err.s +++ b/llvm/test/MC/AMDGPU/literalv216-err.s @@ -30,11 +30,11 @@ v_pk_mad_i16 v5, 0x3c00, 0x4000, 0x4400 // GFX9: error: literal operands are not supported -// GFX10: error: only one literal operand is allowed +// GFX10: 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 literal operand is allowed +// GFX10: error: only one unique literal operand is allowed v_pk_mad_i16 v5, 0x3c00, 3, 2 // GFX9: error: literal operands are not supported diff --git a/llvm/test/MC/AMDGPU/sop2-err.s b/llvm/test/MC/AMDGPU/sop2-err.s --- a/llvm/test/MC/AMDGPU/sop2-err.s +++ b/llvm/test/MC/AMDGPU/sop2-err.s @@ -7,7 +7,7 @@ // GCN: error: invalid operand for instruction s_and_b32 s2, 0x12345678, 0x12345679 -// GCN: error: only one literal operand is allowed +// GCN: error: only one unique literal operand is allowed s_and_b64 s[2:3], 0x12345678, 0x12345679 -// GCN: error: only one literal operand is allowed +// GCN: error: only one unique literal operand is allowed diff --git a/llvm/test/MC/AMDGPU/sopc-err.s b/llvm/test/MC/AMDGPU/sopc-err.s --- a/llvm/test/MC/AMDGPU/sopc-err.s +++ b/llvm/test/MC/AMDGPU/sopc-err.s @@ -28,7 +28,7 @@ // VI: error: expected a VGPR index mode s_cmp_eq_i32 0x12345678, 0x12345679 -// GCN: error: only one literal operand is allowed +// GCN: error: only one unique literal operand is allowed s_cmp_eq_u64 0x12345678, 0x12345679 -// GCN: error: only one literal operand is allowed +// GCN: error: only one unique literal operand is allowed diff --git a/llvm/test/MC/AMDGPU/vop3-literal.s b/llvm/test/MC/AMDGPU/vop3-literal.s --- a/llvm/test/MC/AMDGPU/vop3-literal.s +++ b/llvm/test/MC/AMDGPU/vop3-literal.s @@ -32,7 +32,7 @@ // GFX9-ERR: error: literal operands are not supported v_bfe_u32 v0, 0x3039, s1, 0x3038 -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported v_bfe_u32 v0, 0x3039, v1, v2 @@ -40,7 +40,7 @@ // GFX9-ERR: error: literal operands are not supported v_bfe_u32 v0, 0x3039, 0x12345, v2 -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported v_bfe_u32 v0, s1, 0x3039, s1 @@ -64,7 +64,7 @@ // GFX9-ERR: error: literal operands are not supported v_bfm_b32_e64 v0, 0x3039, 0x3038 -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported v_pk_add_f16 v1, 25.0, v2 @@ -84,7 +84,7 @@ // GFX9-ERR: error: literal operands are not supported v_pk_add_f16 v1, 25.0, 25.1 -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported v_pk_add_u16 v1, -200, v2 @@ -156,7 +156,7 @@ // GFX9-ERR: error: literal operands are not supported v_add_f64 v[0:1], 1.23456, -abs(1.2345) -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported v_max_i16_e64 v5, 0xfe0b, v2 @@ -188,11 +188,11 @@ // GFX9-ERR: error: literal operands are not supported v_min3_i16 v5, 0x5678, 0x5679, 0x5678 -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported v_min3_i16 v5, 0x5678, 0x5678, 0x5679 -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported v_add_nc_u16 v5, 0xfe0b, v2 @@ -256,7 +256,7 @@ // GFX9-ERR: error: literal operands are not supported v_cmp_f_i32_e64 s[10:11], 0xaf123456, 0xaf123455 -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported v_cmp_f_u64_e64 s[10:11], 0xaf123456, v[2:3] @@ -284,7 +284,7 @@ // GFX9-ERR: error: operands are not valid for this GPU or mode v_cmpx_class_f32_e64 0xaf123456, 0xaf123455 -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: operands are not valid for this GPU or mode v_cmpx_lt_i16_e64 v1, 0x3456 @@ -364,7 +364,7 @@ // GFX9-ERR: error: literal operands are not supported v_pk_add_i16 v5, 0xab7b, 0xab7a -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported v_div_fmas_f32 v5, v1, 0x123, v3 @@ -388,7 +388,7 @@ // GFX9-ERR: error: literal operands are not supported v_div_fmas_f64 v[5:6], v[1:2], 0x123457, 0x123456 -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported v_ldexp_f64 v[5:6], 0.12345, v2 @@ -400,5 +400,5 @@ // GFX9-ERR: error: literal operands are not supported v_ldexp_f64 v[5:6], 0.12345, 0x3fbf9a6c -// GFX10-ERR: error: only one literal operand is allowed +// GFX10-ERR: error: only one unique literal operand is allowed // GFX9-ERR: error: literal operands are not supported