Index: lib/Target/AMDGPU/SOPInstructions.td =================================================================== --- lib/Target/AMDGPU/SOPInstructions.td +++ lib/Target/AMDGPU/SOPInstructions.td @@ -82,6 +82,12 @@ let has_sdst = 0; } +class SOP1_0_32R pattern = []> : SOP1_Pseudo < + opName, (outs), (ins SReg_32:$src0), + "$src0", pattern> { + let has_sdst = 0; +} + class SOP1_64 pattern=[]> : SOP1_Pseudo < opName, (outs SReg_64:$sdst), (ins SSrc_b64:$src0), "$sdst, $src0", pattern @@ -210,7 +216,7 @@ def S_MOVRELD_B64 : SOP1_64 <"s_movreld_b64">; } // End Uses = [M0] -def S_CBRANCH_JOIN : SOP1_1 <"s_cbranch_join">; +def S_CBRANCH_JOIN : SOP1_0_32R <"s_cbranch_join">; def S_MOV_REGRD_B32 : SOP1_32 <"s_mov_regrd_b32">; let Defs = [SCC] in { def S_ABS_I32 : SOP1_32 <"s_abs_i32">; Index: test/MC/AMDGPU/sop1.s =================================================================== --- test/MC/AMDGPU/sop1.s +++ test/MC/AMDGPU/sop1.s @@ -232,9 +232,17 @@ // SICI: s_movreld_b64 s[2:3], s[4:5] ; encoding: [0x04,0x31,0x82,0xbe] // VI: s_movreld_b64 s[2:3], s[4:5] ; encoding: [0x04,0x2d,0x82,0xbe] -s_cbranch_join s[4:5] -// SICI: s_cbranch_join s[4:5] ; encoding: [0x04,0x32,0x80,0xbe] -// VI: s_cbranch_join s[4:5] ; encoding: [0x04,0x2e,0x80,0xbe] +s_cbranch_join s4 +// SICI: s_cbranch_join s4 ; encoding: [0x04,0x32,0x80,0xbe] +// VI: s_cbranch_join s4 ; encoding: [0x04,0x2e,0x80,0xbe] + +s_cbranch_join 1 +// NOSICI: error: invalid operand for instruction +// NOVI: error: invalid operand for instruction + +s_cbranch_join 100 +// NOSICI: error: invalid operand for instruction +// NOVI: error: invalid operand for instruction s_abs_i32 s1, s2 // SICI: s_abs_i32 s1, s2 ; encoding: [0x02,0x34,0x81,0xbe] Index: test/MC/Disassembler/AMDGPU/sop1_vi.txt =================================================================== --- test/MC/Disassembler/AMDGPU/sop1_vi.txt +++ test/MC/Disassembler/AMDGPU/sop1_vi.txt @@ -165,7 +165,7 @@ # VI: s_movreld_b64 s[2:3], s[4:5] ; encoding: [0x04,0x2d,0x82,0xbe] 0x04 0x2d 0x82 0xbe -# VI: s_cbranch_join s[4:5] ; encoding: [0x04,0x2e,0x80,0xbe] +# VI: s_cbranch_join s4 ; encoding: [0x04,0x2e,0x80,0xbe] 0x04 0x2e 0x80 0xbe # VI: s_abs_i32 s1, s2 ; encoding: [0x02,0x30,0x81,0xbe]