diff --git a/llvm/lib/Target/AMDGPU/VOPCInstructions.td b/llvm/lib/Target/AMDGPU/VOPCInstructions.td --- a/llvm/lib/Target/AMDGPU/VOPCInstructions.td +++ b/llvm/lib/Target/AMDGPU/VOPCInstructions.td @@ -792,6 +792,7 @@ def _t16 : VOPC_Class_Profile { let IsTrue16 = 1; let Src1RC32 = RegisterOperand.ret>; + let Src1RC64 = VSrc_b32; let Src0DPP = getVregSrcForVT_t16.ret; let Src1DPP = getVregSrcForVT_t16.ret; let Src2DPP = getVregSrcForVT_t16.ret; @@ -819,6 +820,7 @@ def _t16 : VOPC_Class_NoSdst_Profile { let IsTrue16 = 1; let Src1RC32 = RegisterOperand.ret>; + let Src1RC64 = VSrc_b32; let Src0DPP = getVregSrcForVT_t16.ret; let Src1DPP = getVregSrcForVT_t16.ret; let Src2DPP = getVregSrcForVT_t16.ret; diff --git a/llvm/test/MC/AMDGPU/gfx11_asm_vop3c.s b/llvm/test/MC/AMDGPU/gfx11_asm_vop3c.s --- a/llvm/test/MC/AMDGPU/gfx11_asm_vop3c.s +++ b/llvm/test/MC/AMDGPU/gfx11_asm_vop3c.s @@ -59,6 +59,10 @@ // W32: encoding: [0x7b,0x00,0x7d,0xd4,0xfd,0xd4,0x00,0x00] // W64-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction +v_cmp_class_f16_e64 s[10:11], v1, 0.5 +// W64: encoding: [0x0a,0x00,0x7d,0xd4,0x01,0xe1,0x01,0x00] +// W32-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction + v_cmp_class_f16_e64 s[10:11], v1, v2 // W64: encoding: [0x0a,0x00,0x7d,0xd4,0x01,0x05,0x02,0x00] // W32-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: invalid operand for instruction diff --git a/llvm/test/MC/AMDGPU/gfx11_asm_vop3cx.s b/llvm/test/MC/AMDGPU/gfx11_asm_vop3cx.s --- a/llvm/test/MC/AMDGPU/gfx11_asm_vop3cx.s +++ b/llvm/test/MC/AMDGPU/gfx11_asm_vop3cx.s @@ -46,6 +46,9 @@ v_cmpx_class_f16_e64 -|0xfe0b|, vcc_hi // GFX11: encoding: [0x7e,0x01,0xfd,0xd4,0xff,0xd6,0x00,0x20,0x0b,0xfe,0x00,0x00] +v_cmpx_class_f16_e64 v1, 0.5 +// GFX11: encoding: [0x7e,0x00,0xfd,0xd4,0x01,0xe1,0x01,0x00] + v_cmpx_class_f32_e64 v1, v2 // GFX11: encoding: [0x7e,0x00,0xfe,0xd4,0x01,0x05,0x02,0x00] diff --git a/llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vop3c.txt b/llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vop3c.txt --- a/llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vop3c.txt +++ b/llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vop3c.txt @@ -5,6 +5,10 @@ # W64: v_cmp_class_f16_e64 s[10:11], v1, v2 ; encoding: [0x0a,0x00,0x7d,0xd4,0x01,0x05,0x02,0x00] 0x0a,0x00,0x7d,0xd4,0x01,0x05,0x02,0x00 +# W32: v_cmp_class_f16_e64 s10, v1, 0.5 ; encoding: [0x0a,0x00,0x7d,0xd4,0x01,0xe1,0x01,0x00] +# W64: v_cmp_class_f16_e64 s[10:11], v1, 0.5 ; encoding: [0x0a,0x00,0x7d,0xd4,0x01,0xe1,0x01,0x00] +0x0a,0x00,0x7d,0xd4,0x01,0xe1,0x01,0x00 + # W32: v_cmp_class_f16_e64 s10, v255, v2 ; encoding: [0x0a,0x00,0x7d,0xd4,0xff,0x05,0x02,0x00] # W64: v_cmp_class_f16_e64 s[10:11], v255, v2 ; encoding: [0x0a,0x00,0x7d,0xd4,0xff,0x05,0x02,0x00] 0x0a,0x00,0x7d,0xd4,0xff,0x05,0x02,0x00 diff --git a/llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vop3cx.txt b/llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vop3cx.txt --- a/llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vop3cx.txt +++ b/llvm/test/MC/Disassembler/AMDGPU/gfx11_dasm_vop3cx.txt @@ -4,6 +4,9 @@ # GFX11: v_cmpx_class_f16_e64 v1, v2 ; encoding: [0x7e,0x00,0xfd,0xd4,0x01,0x05,0x02,0x00] 0x7e,0x00,0xfd,0xd4,0x01,0x05,0x02,0x00 +# GFX11: v_cmpx_class_f16_e64 v1, 0.5 ; encoding: [0x7e,0x00,0xfd,0xd4,0x01,0xe1,0x01,0x00] +0x7e,0x00,0xfd,0xd4,0x01,0xe1,0x01,0x00 + # GFX11: v_cmpx_class_f16_e64 v255, v2 ; encoding: [0x7e,0x00,0xfd,0xd4,0xff,0x05,0x02,0x00] 0x7e,0x00,0xfd,0xd4,0xff,0x05,0x02,0x00