diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.td b/llvm/lib/Target/AMDGPU/SIInstrInfo.td index 2c20475726a48..e74ccbee975ab 100644 --- a/llvm/lib/Target/AMDGPU/SIInstrInfo.td +++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.td @@ -2242,41 +2242,6 @@ class getAsmVOP3P { - string dst = "$vdst"; - - string isrc0 = !if(!eq(NumSrcArgs, 1), "$src0", "$src0,"); - string isrc1 = !if(!eq(NumSrcArgs, 1), "", - !if(!eq(NumSrcArgs, 2), " $src1", - " $src1,")); - string isrc2 = !if(!eq(NumSrcArgs, 3), " $src2", ""); - - string fsrc0 = !if(!eq(NumSrcArgs, 1), "$src0_modifiers", "$src0_modifiers,"); - string fsrc1 = !if(!eq(NumSrcArgs, 1), "", - !if(!eq(NumSrcArgs, 2), " $src1_modifiers", - " $src1_modifiers,")); - string fsrc2 = !if(!eq(NumSrcArgs, 3), " $src2_modifiers", ""); - - string src0 = !if(Src0HasMods, fsrc0, isrc0); - string src1 = !if(Src1HasMods, fsrc1, isrc1); - string src2 = !if(Src2HasMods, fsrc2, isrc2); - - string bytesel = !if(HasByteSel, "$byte_sel", ""); - string clamp = !if(HasClamp, "$clamp", ""); - string omod = !if(HasOMod, "$omod", ""); - string bitop3 = !if(HasBitOp3, "$bitop3", ""); - string ret = dst#", "#src0#src1#src2#bitop3#"$op_sel"#bytesel#clamp#omod; -} - class getAsmDPP { string dst = !if(HasDst, !if(!eq(DstVT.Size, 1), @@ -2687,14 +2652,7 @@ class VOPProfile _ArgVT, bit _EnableClamp = 0> { HasSrc2Mods, DstVT, HasFP8ByteSel, HasBitOp3>.ret; field string Asm64 = AsmVOP3Base; field string AsmVOP3P = getAsmVOP3P.ret; - field string AsmVOP3OpSel = getAsmVOP3OpSel.ret; + field string AsmVOP3OpSel = AsmVOP3Base; field string AsmVOP3DPP = getAsmVOP3DPP.ret; field string AsmVOP3DPP16 = getAsmVOP3DPP16.ret; field string AsmVOP3DPP8 = getAsmVOP3DPP8.ret; diff --git a/llvm/lib/Target/AMDGPU/VOP3Instructions.td b/llvm/lib/Target/AMDGPU/VOP3Instructions.td index 9f66951372d19..a005e0245b8ff 100644 --- a/llvm/lib/Target/AMDGPU/VOP3Instructions.td +++ b/llvm/lib/Target/AMDGPU/VOP3Instructions.td @@ -626,10 +626,6 @@ def VOP3_CVT_SR_F8_F32_Profile : VOP3_Profile, let HasOpSel = 1; let HasFP8DstByteSel = 1; let HasFP8ByteSel = 0; // It works as a dst-bytesel, but does not have byte_sel operand. - let AsmVOP3OpSel = !subst(", $src2_modifiers", "", - getAsmVOP3OpSel<3, HasClamp, HasOMod, - HasSrc0FloatMods, HasSrc1FloatMods, - HasSrc2FloatMods>.ret); let AsmVOP3Base = !subst(", $src2_modifiers", "", getAsmVOP3Base : VOP3_Profile< let HasSrc2 = 0; let HasSrc2Mods = 1; let HasOpSel = 1; - let AsmVOP3OpSel = !subst(", $src2_modifiers", "", - getAsmVOP3OpSel<3, HasClamp, HasOMod, - HasSrc0FloatMods, HasSrc1FloatMods, - HasSrc2FloatMods>.ret); + let Asm64 = !subst(", $src2_modifiers", "", AsmVOP3Base); let HasExtVOP3DPP = 0; let HasFP8DstByteSel = 1; + let HasFP8ByteSel = 0; } class VOP3_CVT_SCALE_SR_PK_F4_F16BF16_TiedInput_Profile : diff --git a/llvm/lib/Target/AMDGPU/VOPInstructions.td b/llvm/lib/Target/AMDGPU/VOPInstructions.td index 4cd845aaa5497..6045f59d1f040 100644 --- a/llvm/lib/Target/AMDGPU/VOPInstructions.td +++ b/llvm/lib/Target/AMDGPU/VOPInstructions.td @@ -112,9 +112,7 @@ class VOP3_Pseudo pattern = [], bit HasFP8DstByteSel = P.HasFP8DstByteSel; bit HasFP4DstByteSel = P.HasFP4DstByteSel; - let AsmOperands = !if(!and(!not(P.IsTrue16), isVop3OpSel), - P.AsmVOP3OpSel, - !if(!and(isVOP3P, P.IsPacked), P.AsmVOP3P, P.Asm64)); + let AsmOperands = !if(!and(isVOP3P, P.IsPacked), P.AsmVOP3P, P.Asm64); let Size = 8; let mayLoad = 0; @@ -1484,7 +1482,7 @@ class VOP3_Profile_Base : VO let HasModifiers = !if (Features.IsMAI, 0, - !or(Features.IsPacked, Features.HasOpSel, P.HasModifiers)); + !or(Features.IsPacked, P.HasModifiers)); } class VOP3_Profile : VOP3_Profile_Base {