diff --git a/llvm/lib/Target/AMDGPU/BUFInstructions.td b/llvm/lib/Target/AMDGPU/BUFInstructions.td --- a/llvm/lib/Target/AMDGPU/BUFInstructions.td +++ b/llvm/lib/Target/AMDGPU/BUFInstructions.td @@ -55,10 +55,6 @@ !subst("FORMAT_XYZW", "FORMAT_X", Op))); } -class getMTBUFElements { - int ret = 1; -} - class MTBUF_Pseudo pattern=[]> : @@ -223,8 +219,7 @@ } multiclass MTBUF_Pseudo_Loads { + int elems> { def _OFFSET : MTBUF_Load_Pseudo , MTBUFAddr64Table<0, NAME>; @@ -265,8 +260,7 @@ } multiclass MTBUF_Pseudo_Stores { + int elems> { def _OFFSET : MTBUF_Store_Pseudo , MTBUFAddr64Table<0, NAME>; @@ -541,7 +535,6 @@ // opcode because it needs an N+1 register class dest register. multiclass MUBUF_Pseudo_Loads { @@ -565,11 +558,9 @@ } } -multiclass MUBUF_Pseudo_Loads_Lds { - defm NAME : MUBUF_Pseudo_Loads; - defm _LDS : MUBUF_Pseudo_Loads; +multiclass MUBUF_Pseudo_Loads_Lds { + defm NAME : MUBUF_Pseudo_Loads; + defm _LDS : MUBUF_Pseudo_Loads; } class MUBUF_Store_Pseudo .ret> { let FPAtomic = isFP in def _OFFSET : MUBUF_AtomicNoRet_Pseudo , @@ -796,7 +786,7 @@ RegisterClass vdataClass, ValueType vdataType, SDPatternOperator atomic> : - MUBUF_Pseudo_Atomics_NO_RTN, + MUBUF_Pseudo_Atomics_NO_RTN, MUBUF_Pseudo_Atomics_RTN; @@ -924,13 +914,13 @@ // in at least GFX8+ chips. See Bug 37653. let SubtargetPredicate = isGFX8GFX9 in { defm BUFFER_LOAD_DWORDX2_LDS : MUBUF_Pseudo_Loads < - "buffer_load_dwordx2", v2i32, null_frag, 0, 1 + "buffer_load_dwordx2", v2i32, 0, 1 >; defm BUFFER_LOAD_DWORDX3_LDS : MUBUF_Pseudo_Loads < - "buffer_load_dwordx3", v3i32, null_frag, 0, 1 + "buffer_load_dwordx3", v3i32, 0, 1 >; defm BUFFER_LOAD_DWORDX4_LDS : MUBUF_Pseudo_Loads < - "buffer_load_dwordx4", v4i32, null_frag, 0, 1 + "buffer_load_dwordx4", v4i32, 0, 1 >; } @@ -1076,27 +1066,27 @@ let SubtargetPredicate = HasD16LoadStore in { defm BUFFER_LOAD_UBYTE_D16 : MUBUF_Pseudo_Loads < - "buffer_load_ubyte_d16", i32, null_frag, 1 + "buffer_load_ubyte_d16", i32, 1 >; defm BUFFER_LOAD_UBYTE_D16_HI : MUBUF_Pseudo_Loads < - "buffer_load_ubyte_d16_hi", i32, null_frag, 1 + "buffer_load_ubyte_d16_hi", i32, 1 >; defm BUFFER_LOAD_SBYTE_D16 : MUBUF_Pseudo_Loads < - "buffer_load_sbyte_d16", i32, null_frag, 1 + "buffer_load_sbyte_d16", i32, 1 >; defm BUFFER_LOAD_SBYTE_D16_HI : MUBUF_Pseudo_Loads < - "buffer_load_sbyte_d16_hi", i32, null_frag, 1 + "buffer_load_sbyte_d16_hi", i32, 1 >; defm BUFFER_LOAD_SHORT_D16 : MUBUF_Pseudo_Loads < - "buffer_load_short_d16", i32, null_frag, 1 + "buffer_load_short_d16", i32, 1 >; defm BUFFER_LOAD_SHORT_D16_HI : MUBUF_Pseudo_Loads < - "buffer_load_short_d16_hi", i32, null_frag, 1 + "buffer_load_short_d16_hi", i32, 1 >; defm BUFFER_STORE_BYTE_D16_HI : MUBUF_Pseudo_Stores < @@ -1121,10 +1111,10 @@ let SubtargetPredicate = HasAtomicFaddInsts in { defm BUFFER_ATOMIC_ADD_F32 : MUBUF_Pseudo_Atomics_NO_RTN < - "buffer_atomic_add_f32", VGPR_32, f32, atomic_load_fadd_global_noret_32 + "buffer_atomic_add_f32", VGPR_32, f32 >; defm BUFFER_ATOMIC_PK_ADD_F16 : MUBUF_Pseudo_Atomics_NO_RTN < - "buffer_atomic_pk_add_f16", VGPR_32, v2f16, atomic_load_fadd_v2f16_global_noret_32 + "buffer_atomic_pk_add_f16", VGPR_32, v2f16 >; let OtherPredicates = [isGFX90APlus] in { diff --git a/llvm/lib/Target/AMDGPU/EvergreenInstructions.td b/llvm/lib/Target/AMDGPU/EvergreenInstructions.td --- a/llvm/lib/Target/AMDGPU/EvergreenInstructions.td +++ b/llvm/lib/Target/AMDGPU/EvergreenInstructions.td @@ -303,16 +303,16 @@ let SubtargetPredicate = isEGorCayman in { -multiclass AtomicPat { +multiclass AtomicPat { // FIXME: Add _RTN version. We need per WI scratch location to store the old value // EXTRACT_SUBREG here is dummy, we know the node has no uses def : EGOrCaymanPat<(i32 (node_noret i32:$ptr, i32:$data)), (EXTRACT_SUBREG (inst_noret (INSERT_SUBREG (v4i32 (IMPLICIT_DEF)), $data, sub0), $ptr), sub1)>; } -multiclass AtomicIncDecPat { +multiclass AtomicIncDecPat { // FIXME: Add _RTN version. We need per WI scratch location to store the old value // EXTRACT_SUBREG here is dummy, we know the node has no uses def : EGOrCaymanPat<(i32 (node_noret i32:$ptr, C)), @@ -330,47 +330,33 @@ $data, sub0), $ptr), sub1)>; -defm AtomicSwapPat : AtomicPat ; -defm AtomicAddPat : AtomicPat ; -defm AtomicSubPat : AtomicPat ; -defm AtomicMinPat : AtomicPat ; -defm AtomicUMinPat : AtomicPat ; -defm AtomicMaxPat : AtomicPat ; -defm AtomicUMaxPat : AtomicPat ; -defm AtomicAndPat : AtomicPat ; -defm AtomicOrPat : AtomicPat ; -defm AtomicXorPat : AtomicPat ; -defm AtomicIncAddPat : AtomicIncDecPat ; +defm AtomicSubPat : AtomicPat ; +defm AtomicMinPat : AtomicPat ; +defm AtomicUMinPat : AtomicPat ; +defm AtomicMaxPat : AtomicPat ; +defm AtomicUMaxPat : AtomicPat ; +defm AtomicAndPat : AtomicPat ; +defm AtomicOrPat : AtomicPat ; +defm AtomicXorPat : AtomicPat ; +defm AtomicIncAddPat : AtomicIncDecPat ; -defm AtomicIncSubPat : AtomicIncDecPat ; -defm AtomicDecAddPat : AtomicIncDecPat ; -defm AtomicDecSubPat : AtomicIncDecPat ; // Should be predicated on FeatureFP64 diff --git a/llvm/lib/Target/AMDGPU/FLATInstructions.td b/llvm/lib/Target/AMDGPU/FLATInstructions.td --- a/llvm/lib/Target/AMDGPU/FLATInstructions.td +++ b/llvm/lib/Target/AMDGPU/FLATInstructions.td @@ -203,7 +203,7 @@ } class FLAT_Global_Load_AddTid_Pseudo : FLAT_Pseudo< + bit HasTiedOutput = 0, bit EnableSaddr = 0> : FLAT_Pseudo< opName, (outs regClass:$vdst), !con(!if(EnableSaddr, (ins SReg_64:$saddr), (ins)), @@ -224,10 +224,10 @@ } multiclass FLAT_Global_Load_AddTid_Pseudo { - def "" : FLAT_Global_Load_AddTid_Pseudo, + bit HasTiedOutput = 0> { + def "" : FLAT_Global_Load_AddTid_Pseudo, GlobalSaddrTable<0, opName>; - def _SADDR : FLAT_Global_Load_AddTid_Pseudo, + def _SADDR : FLAT_Global_Load_AddTid_Pseudo, GlobalSaddrTable<1, opName>; } @@ -241,7 +241,7 @@ } class FLAT_Global_Store_AddTid_Pseudo : FLAT_Pseudo< + bit EnableSaddr = 0> : FLAT_Pseudo< opName, (outs), !con(!if(EnableSaddr, (ins vdataClass:$vdata, SReg_64:$saddr), (ins vdataClass:$vdata)), @@ -258,11 +258,10 @@ let PseudoInstr = opName#!if(EnableSaddr, "_SADDR", ""); } -multiclass FLAT_Global_Store_AddTid_Pseudo { - def "" : FLAT_Global_Store_AddTid_Pseudo, +multiclass FLAT_Global_Store_AddTid_Pseudo { + def "" : FLAT_Global_Store_AddTid_Pseudo, GlobalSaddrTable<0, opName>; - def _SADDR : FLAT_Global_Store_AddTid_Pseudo, + def _SADDR : FLAT_Global_Store_AddTid_Pseudo, GlobalSaddrTable<1, opName>; } @@ -412,7 +411,6 @@ string opName, RegisterClass vdst_rc, ValueType vt, - SDPatternOperator atomic = null_frag, ValueType data_vt = vt, RegisterClass data_rc = vdst_rc, bit isFP = isFloatType.ret, @@ -483,11 +481,10 @@ RegisterClass vdst_rc, ValueType vt, SDPatternOperator atomic_rtn = null_frag, - SDPatternOperator atomic_no_rtn = null_frag, ValueType data_vt = vt, RegisterClass data_rc = vdst_rc> { let is_flat_global = 1, SubtargetPredicate = HasFlatGlobalInsts in { - defm "" : FLAT_Global_Atomic_Pseudo_NO_RTN; + defm "" : FLAT_Global_Atomic_Pseudo_NO_RTN; defm "" : FLAT_Global_Atomic_Pseudo_RTN; } } @@ -668,12 +665,11 @@ let is_flat_global = 1 in { defm GLOBAL_ATOMIC_CMPSWAP : FLAT_Global_Atomic_Pseudo <"global_atomic_cmpswap", - VGPR_32, i32, AMDGPUatomic_cmp_swap_global_32, null_frag, + VGPR_32, i32, AMDGPUatomic_cmp_swap_global_32, v2i32, VReg_64>; defm GLOBAL_ATOMIC_CMPSWAP_X2 : FLAT_Global_Atomic_Pseudo <"global_atomic_cmpswap_x2", VReg_64, i64, AMDGPUatomic_cmp_swap_global_64, - null_frag, v2i64, VReg_128>; defm GLOBAL_ATOMIC_SWAP : FLAT_Global_Atomic_Pseudo <"global_atomic_swap", diff --git a/llvm/lib/Target/AMDGPU/R600Instructions.td b/llvm/lib/Target/AMDGPU/R600Instructions.td --- a/llvm/lib/Target/AMDGPU/R600Instructions.td +++ b/llvm/lib/Target/AMDGPU/R600Instructions.td @@ -210,16 +210,6 @@ let Inst{63-32} = Word1; } -class R600_REDUCTION inst, dag ins, string asm, list pattern, - InstrItinClass itin = VecALU> : - InstR600 <(outs R600_Reg32:$dst), - ins, - asm, - pattern, - itin>; - - - } // End mayLoad = 1, mayStore = 0, hasSideEffects = 0 class EG_CF_RAT cfinst, bits <6> ratinst, bits<4> ratid, bits<4> mask, @@ -813,7 +803,7 @@ let isPseudo = 1, isCodeGenOnly = 1, usesCustomInserter = 1 in { -class MOV_IMM : R600WrapperInst < +class MOV_IMM : R600WrapperInst < (outs R600_Reg32:$dst), (ins immType:$imm), "", @@ -824,20 +814,20 @@ } // end let isPseudo = 1, isCodeGenOnly = 1, usesCustomInserter = 1 -def MOV_IMM_I32 : MOV_IMM; +def MOV_IMM_I32 : MOV_IMM; def : R600Pat < (imm:$val), (MOV_IMM_I32 imm:$val) >; -def MOV_IMM_GLOBAL_ADDR : MOV_IMM; +def MOV_IMM_GLOBAL_ADDR : MOV_IMM; def : R600Pat < (AMDGPUconstdata_ptr tglobaladdr:$addr), (MOV_IMM_GLOBAL_ADDR tglobaladdr:$addr) >; -def MOV_IMM_F32 : MOV_IMM; +def MOV_IMM_F32 : MOV_IMM; def : R600Pat < (fpimm:$val), (MOV_IMM_F32 fpimm:$val) diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.td b/llvm/lib/Target/AMDGPU/SIInstrInfo.td --- a/llvm/lib/Target/AMDGPU/SIInstrInfo.td +++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.td @@ -1856,8 +1856,8 @@ // Returns the assembly string for the inputs and outputs of a VOP3P // instruction. -class getAsmVOP3P { +class getAsmVOP3P { string dst = "$vdst"; string src0 = !if(!eq(NumSrcArgs, 1), "$src0", "$src0,"); string src1 = !if(!eq(NumSrcArgs, 1), "", @@ -1875,7 +1875,6 @@ class getAsmVOP3OpSel { @@ -2018,8 +2017,7 @@ ); } -class getHasDPP { +class getHasDPP { bit ret = !if(!eq(NumSrcArgs, 3), 0, // NumSrcArgs == 3 - No DPP for VOP3 1); @@ -2027,14 +2025,14 @@ class getHasExt64BitDPP { - bit ret = !and(getHasDPP.ret, + bit ret = !and(getHasDPP.ret, getHas64BitOps.ret); } // Function that checks if instruction supports DPP and SDWA class getHasExt { - bit ret = !or(getHasDPP.ret, + bit ret = !or(getHasDPP.ret, getHasSDWA.ret); } @@ -2138,7 +2136,7 @@ field bit HasSrc2Mods = !if(HasModifiers, !or(HasSrc2FloatMods, HasSrc2IntMods), 0); field bit HasExt = getHasExt.ret; - field bit HasExtDPP = getHasDPP.ret; + field bit HasExtDPP = getHasDPP.ret; field bit HasExt64BitDPP = getHasExt64BitDPP.ret; field bit HasExtSDWA = getHasSDWA.ret; field bit HasExtSDWA9 = HasExtSDWA; @@ -2189,9 +2187,9 @@ field string Asm32 = getAsm32.ret; field string Asm64 = getAsm64.ret; - field string AsmVOP3P = getAsmVOP3P.ret; + field string AsmVOP3P = getAsmVOP3P.ret; field string AsmVOP3OpSel = getAsmVOP3OpSel.ret; diff --git a/llvm/lib/Target/AMDGPU/SIRegisterInfo.td b/llvm/lib/Target/AMDGPU/SIRegisterInfo.td --- a/llvm/lib/Target/AMDGPU/SIRegisterInfo.td +++ b/llvm/lib/Target/AMDGPU/SIRegisterInfo.td @@ -126,10 +126,6 @@ let HWEncoding = regIdx; } -class SIRegWithSubRegs subregs, bits<16> regIdx> : - RegisterWithSubRegs { -} - // For register classes that use TSFlags. class SIRegisterClass rTypes, int Align, dag rList> : RegisterClass { diff --git a/llvm/lib/Target/AMDGPU/SOPInstructions.td b/llvm/lib/Target/AMDGPU/SOPInstructions.td --- a/llvm/lib/Target/AMDGPU/SOPInstructions.td +++ b/llvm/lib/Target/AMDGPU/SOPInstructions.td @@ -714,7 +714,7 @@ bits<1> has_sdst = 1; } -class SOPK_Real op, SOPK_Pseudo ps> : +class SOPK_Real : InstSI { let SALU = 1; @@ -740,7 +740,7 @@ } class SOPK_Real32 op, SOPK_Pseudo ps> : - SOPK_Real , + SOPK_Real , Enc32 { let Inst{15-0} = simm16; let Inst{22-16} = !if(ps.has_sdst, sdst, ?); @@ -749,7 +749,7 @@ } class SOPK_Real64 op, SOPK_Pseudo ps> : - SOPK_Real, + SOPK_Real, Enc64 { let Inst{15-0} = simm16; let Inst{22-16} = !if(ps.has_sdst, sdst, ?); @@ -1108,7 +1108,7 @@ } //spaces inserted in realname on instantiation of this record to allow s_endpgm to omit whitespace -class SOPP_Real op, SOPP_Pseudo ps, string real_name = ps.Mnemonic> : +class SOPP_Real : InstSI { let SALU = 1; @@ -1128,14 +1128,14 @@ bits <16> simm16; } -class SOPP_Real_32 op, SOPP_Pseudo ps, string real_name = ps.Mnemonic> : SOPP_Real, +class SOPP_Real_32 op, SOPP_Pseudo ps, string real_name = ps.Mnemonic> : SOPP_Real, Enc32 { let Inst{15-0} = !if(ps.fixed_imm, ps.simm16, simm16); let Inst{22-16} = op; let Inst{31-23} = 0x17f; } -class SOPP_Real_64 op, SOPP_Pseudo ps, string real_name = ps.Mnemonic> : SOPP_Real, +class SOPP_Real_64 op, SOPP_Pseudo ps, string real_name = ps.Mnemonic> : SOPP_Real, Enc64 { // encoding let Inst{15-0} = !if(ps.fixed_imm, ps.simm16, simm16); diff --git a/llvm/lib/Target/AMDGPU/VOP2Instructions.td b/llvm/lib/Target/AMDGPU/VOP2Instructions.td --- a/llvm/lib/Target/AMDGPU/VOP2Instructions.td +++ b/llvm/lib/Target/AMDGPU/VOP2Instructions.td @@ -154,8 +154,6 @@ multiclass VOP2Inst_sdwa { let renamedInGFX9 = GFX9Renamed in { foreach _ = BoolToList.ret in @@ -170,7 +168,7 @@ bit GFX9Renamed = 0> : VOP2Inst_e32, VOP2Inst_e64, - VOP2Inst_sdwa { + VOP2Inst_sdwa { let renamedInGFX9 = GFX9Renamed in { foreach _ = BoolToList.ret in def _dpp : VOP2_DPP_Pseudo ; @@ -927,7 +925,7 @@ SIMCInstr ; class VOP2_DPP8 op, VOP2_Pseudo ps, - string opName = ps.OpName, VOPProfile p = ps.Pfl> : + VOPProfile p = ps.Pfl> : VOP_DPP8 { let hasSideEffects = ps.hasSideEffects; let Defs = ps.Defs; @@ -1123,14 +1121,14 @@ multiclass VOP2be_Real_dpp8_gfx10 op, string opName, string asmName> { foreach _ = BoolToList(opName#"_e32").Pfl.HasExtDPP>.ret in def _dpp8_gfx10 : - VOP2_DPP8(opName#"_e32"), asmName> { + VOP2_DPP8(opName#"_e32")> { string AsmDPP8 = !cast(opName#"_e32").Pfl.AsmDPP8; let AsmString = asmName # !subst(", vcc", "", AsmDPP8); let DecoderNamespace = "DPP8"; } foreach _ = BoolToList(opName#"_e32").Pfl.HasExtDPP>.ret in def _dpp8_w32_gfx10 : - VOP2_DPP8(opName#"_e32"), asmName> { + VOP2_DPP8(opName#"_e32")> { string AsmDPP8 = !cast(opName#"_e32").Pfl.AsmDPP8; let AsmString = asmName # !subst("vcc", "vcc_lo", AsmDPP8); let isAsmParserOnly = 1; @@ -1138,7 +1136,7 @@ } foreach _ = BoolToList(opName#"_e32").Pfl.HasExtDPP>.ret in def _dpp8_w64_gfx10 : - VOP2_DPP8(opName#"_e32"), asmName> { + VOP2_DPP8(opName#"_e32")> { string AsmDPP8 = !cast(opName#"_e32").Pfl.AsmDPP8; let AsmString = asmName # AsmDPP8; let isAsmParserOnly = 1; diff --git a/llvm/lib/Target/AMDGPU/VOP3Instructions.td b/llvm/lib/Target/AMDGPU/VOP3Instructions.td --- a/llvm/lib/Target/AMDGPU/VOP3Instructions.td +++ b/llvm/lib/Target/AMDGPU/VOP3Instructions.td @@ -120,11 +120,11 @@ } // Consistently gives instructions a _e64 suffix. -multiclass VOP3Inst_Pseudo_Wrapper pattern = [], bit VOP3Only = 0> { - def _e64 : VOP3_Pseudo; +multiclass VOP3Inst_Pseudo_Wrapper pattern = []> { + def _e64 : VOP3_Pseudo; } -class VOP3InstBase : +class VOP3InstBase : VOP3_Pseudo.ret, getVOP3Pat.ret)))), - VOP3Only, 0, P.HasOpSel> { + 0, P.HasOpSel> { let IntClamp = P.HasIntClamp; let AsmMatchConverter = @@ -148,8 +148,8 @@ "")); } -multiclass VOP3Inst { - def _e64 : VOP3InstBase; +multiclass VOP3Inst { + def _e64 : VOP3InstBase; } // Special case for v_div_fmas_{f32|f64}, since it seems to be the @@ -296,11 +296,11 @@ let SchedRW = [WriteDoubleAdd] in { let FPDPRounding = 1 in { defm V_FMA_F64 : VOP3Inst <"v_fma_f64", VOP3_Profile, any_fma>; -defm V_ADD_F64 : VOP3Inst <"v_add_f64", VOP3_Profile, any_fadd, 1>; -defm V_MUL_F64 : VOP3Inst <"v_mul_f64", VOP3_Profile, fmul, 1>; +defm V_ADD_F64 : VOP3Inst <"v_add_f64", VOP3_Profile, any_fadd>; +defm V_MUL_F64 : VOP3Inst <"v_mul_f64", VOP3_Profile, fmul>; } // End FPDPRounding = 1 -defm V_MIN_F64 : VOP3Inst <"v_min_f64", VOP3_Profile, fminnum_like, 1>; -defm V_MAX_F64 : VOP3Inst <"v_max_f64", VOP3_Profile, fmaxnum_like, 1>; +defm V_MIN_F64 : VOP3Inst <"v_min_f64", VOP3_Profile, fminnum_like>; +defm V_MAX_F64 : VOP3Inst <"v_max_f64", VOP3_Profile, fmaxnum_like>; } // End SchedRW = [WriteDoubleAdd] let SchedRW = [WriteIntMul] in { @@ -371,18 +371,18 @@ let SchedRW = [WriteDoubleAdd], FPDPRounding = 1 in { defm V_DIV_FIXUP_F64 : VOP3Inst <"v_div_fixup_f64", VOP3_Profile, AMDGPUdiv_fixup>; - defm V_LDEXP_F64 : VOP3Inst <"v_ldexp_f64", VOP3_Profile, AMDGPUldexp, 1>; + defm V_LDEXP_F64 : VOP3Inst <"v_ldexp_f64", VOP3_Profile, AMDGPUldexp>; } // End SchedRW = [WriteDoubleAdd], FPDPRounding = 1 } // End isReMaterializable = 1 let mayRaiseFPException = 0 in { // Seems suspicious but manual doesn't say it does. let SchedRW = [WriteFloatFMA, WriteSALU] in - defm V_DIV_SCALE_F32 : VOP3Inst_Pseudo_Wrapper <"v_div_scale_f32", VOP3b_F32_I1_F32_F32_F32, [], 1> ; + defm V_DIV_SCALE_F32 : VOP3Inst_Pseudo_Wrapper <"v_div_scale_f32", VOP3b_F32_I1_F32_F32_F32> ; // Double precision division pre-scale. let SchedRW = [WriteDouble, WriteSALU], FPDPRounding = 1 in - defm V_DIV_SCALE_F64 : VOP3Inst_Pseudo_Wrapper <"v_div_scale_f64", VOP3b_F64_I1_F64_F64_F64, [], 1>; + defm V_DIV_SCALE_F64 : VOP3Inst_Pseudo_Wrapper <"v_div_scale_f64", VOP3b_F64_I1_F64_F64_F64>; } // End mayRaiseFPException = 0 let isReMaterializable = 1 in @@ -528,7 +528,7 @@ let Predicates = [Has16BitInsts, isGFX6GFX7GFX8GFX9] in { multiclass Ternary_i16_Pats { + Instruction inst> { def : GCNPat < (op2 (op1 i16:$src0, i16:$src1), i16:$src2), (inst i16:$src0, i16:$src1, i16:$src2, (i1 0)) @@ -536,15 +536,15 @@ } -defm: Ternary_i16_Pats; -defm: Ternary_i16_Pats; +defm: Ternary_i16_Pats; +defm: Ternary_i16_Pats; } // End Predicates = [Has16BitInsts, isGFX6GFX7GFX8GFX9] let Predicates = [Has16BitInsts, isGFX10Plus] in { multiclass Ternary_i16_Pats_gfx9 { + Instruction inst> { def : GCNPat < (op2 (op1 i16:$src0, i16:$src1), i16:$src2), (inst SRCMODS.NONE, $src0, SRCMODS.NONE, $src1, SRCMODS.NONE, $src2, DSTCLAMP.NONE) @@ -552,8 +552,8 @@ } -defm: Ternary_i16_Pats_gfx9; -defm: Ternary_i16_Pats_gfx9; +defm: Ternary_i16_Pats_gfx9; +defm: Ternary_i16_Pats_gfx9; } // End Predicates = [Has16BitInsts, isGFX10Plus] diff --git a/llvm/lib/Target/AMDGPU/VOP3PInstructions.td b/llvm/lib/Target/AMDGPU/VOP3PInstructions.td --- a/llvm/lib/Target/AMDGPU/VOP3PInstructions.td +++ b/llvm/lib/Target/AMDGPU/VOP3PInstructions.td @@ -50,8 +50,7 @@ // Non-packed instructions that use the VOP3P encoding. // VOP3 neg/abs and VOP3P opsel/opsel_hi modifiers are allowed. -multiclass VOP3_VOP3PInst { +multiclass VOP3_VOP3PInst { def NAME : VOP3P_Pseudo { let Constraints = !if(P.UseTiedOutput, "$vdst = $vdst_in", ""); let DisableEncoding = !if(P.UseTiedOutput, "$vdst_in", ""); @@ -113,7 +112,6 @@ } // End SubtargetPredicate = HasVOP3PInsts multiclass MadFmaMixPats { def : GCNPat < @@ -192,7 +190,7 @@ } // End FPDPRounding = 1 } -defm : MadFmaMixPats; +defm : MadFmaMixPats; } // End SubtargetPredicate = HasMadMixInsts @@ -211,7 +209,7 @@ } // End FPDPRounding = 1 } -defm : MadFmaMixPats; +defm : MadFmaMixPats; } // Defines patterns that extract signed 4bit from each Idx[0]. diff --git a/llvm/lib/Target/AMDGPU/VOPInstructions.td b/llvm/lib/Target/AMDGPU/VOPInstructions.td --- a/llvm/lib/Target/AMDGPU/VOPInstructions.td +++ b/llvm/lib/Target/AMDGPU/VOPInstructions.td @@ -57,8 +57,7 @@ } class VOP3Common pattern = [], bit HasMods = 0, - bit VOP3Only = 0> : + list pattern = [], bit HasMods = 0> : VOPAnyCommon { // Using complex patterns gives VOP3 patterns a very high complexity rating, @@ -83,7 +82,7 @@ } class VOP3_Pseudo pattern = [], - bit VOP3Only = 0, bit isVOP3P = 0, bit isVop3OpSel = 0> : + bit isVOP3P = 0, bit isVop3OpSel = 0> : VOP_Pseudo pattern = []> : - VOP3_Pseudo { + VOP3_Pseudo { let VOP3P = 1; }