Index: lib/Target/AMDGPU/SIInstrFormats.td =================================================================== --- lib/Target/AMDGPU/SIInstrFormats.td +++ lib/Target/AMDGPU/SIInstrFormats.td @@ -163,9 +163,9 @@ class SOP1e op> : Enc32 { bits<7> sdst; - bits<8> ssrc0; + bits<8> src0; - let Inst{7-0} = ssrc0; + let Inst{7-0} = src0; let Inst{15-8} = op; let Inst{22-16} = sdst; let Inst{31-23} = 0x17d; //encoding; @@ -173,22 +173,22 @@ class SOP2e op> : Enc32 { bits<7> sdst; - bits<8> ssrc0; - bits<8> ssrc1; + bits<8> src0; + bits<8> src1; - let Inst{7-0} = ssrc0; - let Inst{15-8} = ssrc1; + let Inst{7-0} = src0; + let Inst{15-8} = src1; let Inst{22-16} = sdst; let Inst{29-23} = op; let Inst{31-30} = 0x2; // encoding } class SOPCe op> : Enc32 { - bits<8> ssrc0; - bits<8> ssrc1; + bits<8> src0; + bits<8> src1; - let Inst{7-0} = ssrc0; - let Inst{15-8} = ssrc1; + let Inst{7-0} = src0; + let Inst{15-8} = src1; let Inst{22-16} = op; let Inst{31-23} = 0x17e; } Index: lib/Target/AMDGPU/SIInstrInfo.td =================================================================== --- lib/Target/AMDGPU/SIInstrInfo.td +++ lib/Target/AMDGPU/SIInstrInfo.td @@ -820,27 +820,27 @@ } multiclass SOP1_32 pattern> : SOP1_m < - op, opName, (outs SReg_32:$dst), (ins SSrc_32:$src0), - opName#" $dst, $src0", pattern + op, opName, (outs SReg_32:$sdst), (ins SSrc_32:$src0), + opName#" $sdst, $src0", pattern >; multiclass SOP1_64 pattern> : SOP1_m < - op, opName, (outs SReg_64:$dst), (ins SSrc_64:$src0), - opName#" $dst, $src0", pattern + op, opName, (outs SReg_64:$sdst), (ins SSrc_64:$src0), + opName#" $sdst, $src0", pattern >; // no input, 64-bit output. multiclass SOP1_64_0 pattern> { - def "" : SOP1_Pseudo ; + def "" : SOP1_Pseudo ; - def _si : SOP1_Real_si { - let ssrc0 = 0; + def _si : SOP1_Real_si { + let src0 = 0; } - def _vi : SOP1_Real_vi { - let ssrc0 = 0; + def _vi : SOP1_Real_vi { + let src0 = 0; } } @@ -861,8 +861,8 @@ // 64-bit input, 32-bit output. multiclass SOP1_32_64 pattern> : SOP1_m < - op, opName, (outs SReg_32:$dst), (ins SSrc_64:$src0), - opName#" $dst, $src0", pattern + op, opName, (outs SReg_32:$sdst), (ins SSrc_64:$src0), + opName#" $sdst, $src0", pattern >; class SOP2_Pseudo pattern> : @@ -909,23 +909,23 @@ } multiclass SOP2_32 pattern> : SOP2_m < - op, opName, (outs SReg_32:$dst), (ins SSrc_32:$src0, SSrc_32:$src1), - opName#" $dst, $src0, $src1", pattern + op, opName, (outs SReg_32:$sdst), (ins SSrc_32:$src0, SSrc_32:$src1), + opName#" $sdst, $src0, $src1", pattern >; multiclass SOP2_64 pattern> : SOP2_m < - op, opName, (outs SReg_64:$dst), (ins SSrc_64:$src0, SSrc_64:$src1), - opName#" $dst, $src0, $src1", pattern + op, opName, (outs SReg_64:$sdst), (ins SSrc_64:$src0, SSrc_64:$src1), + opName#" $sdst, $src0, $src1", pattern >; multiclass SOP2_64_32 pattern> : SOP2_m < - op, opName, (outs SReg_64:$dst), (ins SSrc_64:$src0, SSrc_32:$src1), - opName#" $dst, $src0, $src1", pattern + op, opName, (outs SReg_64:$sdst), (ins SSrc_64:$src0, SSrc_32:$src1), + opName#" $sdst, $src0, $src1", pattern >; multiclass SOP2_64_32_32 pattern> : SOP2_m < - op, opName, (outs SReg_64:$dst), (ins SSrc_32:$src0, SSrc_32:$src1), - opName#" $dst, $src0, $src1", pattern + op, opName, (outs SReg_64:$sdst), (ins SSrc_32:$src0, SSrc_32:$src1), + opName#" $sdst, $src0, $src1", pattern >; class SOPC_Helper op, RegisterOperand rc, ValueType vt, @@ -980,14 +980,14 @@ } multiclass SOPK_32 pattern> { - def "" : SOPK_Pseudo ; - def _si : SOPK_Real_si ; + def _si : SOPK_Real_si ; - def _vi : SOPK_Real_vi ; + def _vi : SOPK_Real_vi ; } multiclass SOPK_SCC pattern> { Index: lib/Target/AMDGPU/SIInstructions.td =================================================================== --- lib/Target/AMDGPU/SIInstructions.td +++ lib/Target/AMDGPU/SIInstructions.td @@ -119,11 +119,11 @@ let Defs = [SCC] in { defm S_NOT_B32 : SOP1_32 , "s_not_b32", - [(set i32:$dst, (not i32:$src0))] + [(set i32:$sdst, (not i32:$src0))] >; defm S_NOT_B64 : SOP1_64 , "s_not_b64", - [(set i64:$dst, (not i64:$src0))] + [(set i64:$sdst, (not i64:$src0))] >; defm S_WQM_B32 : SOP1_32 , "s_wqm_b32", []>; defm S_WQM_B64 : SOP1_64 , "s_wqm_b64", []>; @@ -131,7 +131,7 @@ defm S_BREV_B32 : SOP1_32 , "s_brev_b32", - [(set i32:$dst, (bitreverse i32:$src0))] + [(set i32:$sdst, (bitreverse i32:$src0))] >; defm S_BREV_B64 : SOP1_64 , "s_brev_b64", []>; @@ -139,7 +139,7 @@ defm S_BCNT0_I32_B32 : SOP1_32 , "s_bcnt0_i32_b32", []>; defm S_BCNT0_I32_B64 : SOP1_32_64 , "s_bcnt0_i32_b64", []>; defm S_BCNT1_I32_B32 : SOP1_32 , "s_bcnt1_i32_b32", - [(set i32:$dst, (ctpop i32:$src0))] + [(set i32:$sdst, (ctpop i32:$src0))] >; defm S_BCNT1_I32_B64 : SOP1_32_64 , "s_bcnt1_i32_b64", []>; } // End Defs = [SCC] @@ -147,24 +147,24 @@ defm S_FF0_I32_B32 : SOP1_32 , "s_ff0_i32_b32", []>; defm S_FF0_I32_B64 : SOP1_32_64 , "s_ff0_i32_b64", []>; defm S_FF1_I32_B32 : SOP1_32 , "s_ff1_i32_b32", - [(set i32:$dst, (cttz_zero_undef i32:$src0))] + [(set i32:$sdst, (cttz_zero_undef i32:$src0))] >; defm S_FF1_I32_B64 : SOP1_32_64 , "s_ff1_i32_b64", []>; defm S_FLBIT_I32_B32 : SOP1_32 , "s_flbit_i32_b32", - [(set i32:$dst, (AMDGPUffbh_u32 i32:$src0))] + [(set i32:$sdst, (AMDGPUffbh_u32 i32:$src0))] >; defm S_FLBIT_I32_B64 : SOP1_32_64 , "s_flbit_i32_b64", []>; defm S_FLBIT_I32 : SOP1_32 , "s_flbit_i32", - [(set i32:$dst, (int_AMDGPU_flbit_i32 i32:$src0))] + [(set i32:$sdst, (int_AMDGPU_flbit_i32 i32:$src0))] >; defm S_FLBIT_I32_I64 : SOP1_32_64 , "s_flbit_i32_i64", []>; defm S_SEXT_I32_I8 : SOP1_32 , "s_sext_i32_i8", - [(set i32:$dst, (sext_inreg i32:$src0, i8))] + [(set i32:$sdst, (sext_inreg i32:$src0, i8))] >; defm S_SEXT_I32_I16 : SOP1_32 , "s_sext_i32_i16", - [(set i32:$dst, (sext_inreg i32:$src0, i16))] + [(set i32:$sdst, (sext_inreg i32:$src0, i16))] >; defm S_BITSET0_B32 : SOP1_32 , "s_bitset0_b32", []>; @@ -214,36 +214,36 @@ let isCommutable = 1 in { defm S_ADD_U32 : SOP2_32 , "s_add_u32", []>; defm S_ADD_I32 : SOP2_32 , "s_add_i32", - [(set i32:$dst, (add SSrc_32:$src0, SSrc_32:$src1))] + [(set i32:$sdst, (add SSrc_32:$src0, SSrc_32:$src1))] >; } // End isCommutable = 1 defm S_SUB_U32 : SOP2_32 , "s_sub_u32", []>; defm S_SUB_I32 : SOP2_32 , "s_sub_i32", - [(set i32:$dst, (sub SSrc_32:$src0, SSrc_32:$src1))] + [(set i32:$sdst, (sub SSrc_32:$src0, SSrc_32:$src1))] >; let Uses = [SCC] in { // Carry in comes from SCC let isCommutable = 1 in { defm S_ADDC_U32 : SOP2_32 , "s_addc_u32", - [(set i32:$dst, (adde (i32 SSrc_32:$src0), (i32 SSrc_32:$src1)))]>; + [(set i32:$sdst, (adde (i32 SSrc_32:$src0), (i32 SSrc_32:$src1)))]>; } // End isCommutable = 1 defm S_SUBB_U32 : SOP2_32 , "s_subb_u32", - [(set i32:$dst, (sube (i32 SSrc_32:$src0), (i32 SSrc_32:$src1)))]>; + [(set i32:$sdst, (sube (i32 SSrc_32:$src0), (i32 SSrc_32:$src1)))]>; } // End Uses = [SCC] defm S_MIN_I32 : SOP2_32 , "s_min_i32", - [(set i32:$dst, (smin i32:$src0, i32:$src1))] + [(set i32:$sdst, (smin i32:$src0, i32:$src1))] >; defm S_MIN_U32 : SOP2_32 , "s_min_u32", - [(set i32:$dst, (umin i32:$src0, i32:$src1))] + [(set i32:$sdst, (umin i32:$src0, i32:$src1))] >; defm S_MAX_I32 : SOP2_32 , "s_max_i32", - [(set i32:$dst, (smax i32:$src0, i32:$src1))] + [(set i32:$sdst, (smax i32:$src0, i32:$src1))] >; defm S_MAX_U32 : SOP2_32 , "s_max_u32", - [(set i32:$dst, (umax i32:$src0, i32:$src1))] + [(set i32:$sdst, (umax i32:$src0, i32:$src1))] >; } // End Defs = [SCC] @@ -255,27 +255,27 @@ let Defs = [SCC] in { defm S_AND_B32 : SOP2_32 , "s_and_b32", - [(set i32:$dst, (and i32:$src0, i32:$src1))] + [(set i32:$sdst, (and i32:$src0, i32:$src1))] >; defm S_AND_B64 : SOP2_64 , "s_and_b64", - [(set i64:$dst, (and i64:$src0, i64:$src1))] + [(set i64:$sdst, (and i64:$src0, i64:$src1))] >; defm S_OR_B32 : SOP2_32 , "s_or_b32", - [(set i32:$dst, (or i32:$src0, i32:$src1))] + [(set i32:$sdst, (or i32:$src0, i32:$src1))] >; defm S_OR_B64 : SOP2_64 , "s_or_b64", - [(set i64:$dst, (or i64:$src0, i64:$src1))] + [(set i64:$sdst, (or i64:$src0, i64:$src1))] >; defm S_XOR_B32 : SOP2_32 , "s_xor_b32", - [(set i32:$dst, (xor i32:$src0, i32:$src1))] + [(set i32:$sdst, (xor i32:$src0, i32:$src1))] >; defm S_XOR_B64 : SOP2_64 , "s_xor_b64", - [(set i64:$dst, (xor i64:$src0, i64:$src1))] + [(set i64:$sdst, (xor i64:$src0, i64:$src1))] >; defm S_ANDN2_B32 : SOP2_32 , "s_andn2_b32", []>; defm S_ANDN2_B64 : SOP2_64 , "s_andn2_b64", []>; @@ -294,30 +294,30 @@ let Defs = [SCC] in { defm S_LSHL_B32 : SOP2_32 , "s_lshl_b32", - [(set i32:$dst, (shl i32:$src0, i32:$src1))] + [(set i32:$sdst, (shl i32:$src0, i32:$src1))] >; defm S_LSHL_B64 : SOP2_64_32 , "s_lshl_b64", - [(set i64:$dst, (shl i64:$src0, i32:$src1))] + [(set i64:$sdst, (shl i64:$src0, i32:$src1))] >; defm S_LSHR_B32 : SOP2_32 , "s_lshr_b32", - [(set i32:$dst, (srl i32:$src0, i32:$src1))] + [(set i32:$sdst, (srl i32:$src0, i32:$src1))] >; defm S_LSHR_B64 : SOP2_64_32 , "s_lshr_b64", - [(set i64:$dst, (srl i64:$src0, i32:$src1))] + [(set i64:$sdst, (srl i64:$src0, i32:$src1))] >; defm S_ASHR_I32 : SOP2_32 , "s_ashr_i32", - [(set i32:$dst, (sra i32:$src0, i32:$src1))] + [(set i32:$sdst, (sra i32:$src0, i32:$src1))] >; defm S_ASHR_I64 : SOP2_64_32 , "s_ashr_i64", - [(set i64:$dst, (sra i64:$src0, i32:$src1))] + [(set i64:$sdst, (sra i64:$src0, i32:$src1))] >; } // End Defs = [SCC] defm S_BFM_B32 : SOP2_32 , "s_bfm_b32", - [(set i32:$dst, (AMDGPUbfm i32:$src0, i32:$src1))]>; + [(set i32:$sdst, (AMDGPUbfm i32:$src0, i32:$src1))]>; defm S_BFM_B64 : SOP2_64_32_32 , "s_bfm_b64", []>; defm S_MUL_I32 : SOP2_32 , "s_mul_i32", - [(set i32:$dst, (mul i32:$src0, i32:$src1))] + [(set i32:$sdst, (mul i32:$src0, i32:$src1))] >; } // End AddedComplexity = 1 @@ -513,7 +513,7 @@ let mayStore = 1; } -def S_SETPRIO : SOPP <0x0000000f, (ins i16imm:$sim16), "s_setprio $sim16">; +def S_SETPRIO : SOPP <0x0000000f, (ins i16imm:$simm16), "s_setprio $simm16">; let Uses = [EXEC, M0] in { // FIXME: Should this be mayLoad+mayStore?