Skip to content

Commit 79b29d6

Browse files
committed
AMDGPU: Remove DisableInst feature
I'm not sure why these were bothering to check the instruction profile, since those profiles should only be used with these instruction classes.
1 parent 70726ce commit 79b29d6

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

llvm/lib/Target/AMDGPU/SIInstrInfo.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ def isWave32 : Predicate<"Subtarget->getWavefrontSize() == 32">,
1111
def isWave64 : Predicate<"Subtarget->getWavefrontSize() == 64">,
1212
AssemblerPredicate <(all_of FeatureWavefrontSize64)>;
1313

14-
def DisableInst : Predicate <"false">, AssemblerPredicate<(all_of FeatureDisable)>;
15-
1614
class GCNPredicateControl : PredicateControl {
1715
Predicate SIAssemblerPredicate = isGFX6GFX7;
1816
Predicate VIAssemblerPredicate = isGFX8GFX9;

llvm/lib/Target/AMDGPU/VOP1Instructions.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ class VOP1_DPP<bits<8> op, VOP1_DPP_Pseudo ps, VOPProfile p = ps.Pfl, bit isDPP1
456456
class VOP1_DPP16<bits<8> op, VOP1_DPP_Pseudo ps, VOPProfile p = ps.Pfl> :
457457
VOP1_DPP<op, ps, p, 1>,
458458
SIMCInstr <ps.PseudoInstr, SIEncodingFamily.GFX10> {
459-
let AssemblerPredicate = !if(p.HasExt, HasDPP16, DisableInst);
459+
let AssemblerPredicate = HasDPP16;
460460
let SubtargetPredicate = HasDPP16;
461461
}
462462

@@ -473,7 +473,7 @@ class VOP1_DPP8<bits<8> op, VOP1_Pseudo ps, VOPProfile p = ps.Pfl> :
473473
let Inst{24-17} = !if(p.EmitDst, vdst{7-0}, 0);
474474
let Inst{31-25} = 0x3f;
475475

476-
let AssemblerPredicate = !if(p.HasExt, HasDPP8, DisableInst);
476+
let AssemblerPredicate = HasDPP8;
477477
let SubtargetPredicate = HasDPP8;
478478
}
479479

llvm/lib/Target/AMDGPU/VOP2Instructions.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ class VOP2_DPP<bits<6> op, VOP2_DPP_Pseudo ps,
834834
class Base_VOP2_DPP16<bits<6> op, VOP2_DPP_Pseudo ps,
835835
string opName = ps.OpName, VOPProfile p = ps.Pfl> :
836836
VOP2_DPP<op, ps, opName, p, 1> {
837-
let AssemblerPredicate = !if(p.HasExt, HasDPP16, DisableInst);
837+
let AssemblerPredicate = HasDPP16;
838838
let SubtargetPredicate = HasDPP16;
839839
}
840840

@@ -860,7 +860,7 @@ class VOP2_DPP8<bits<6> op, VOP2_Pseudo ps,
860860
let Inst{30-25} = op;
861861
let Inst{31} = 0x0;
862862

863-
let AssemblerPredicate = !if(p.HasExt, HasDPP8, DisableInst);
863+
let AssemblerPredicate = HasDPP8;
864864
let SubtargetPredicate = HasDPP8;
865865
}
866866

llvm/lib/Target/AMDGPU/VOPInstructions.td

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ class VOP_SDWA_Pseudo <string opName, VOPProfile P, list<dag> pattern=[]> :
492492
let SDWA = 1;
493493
let Uses = [EXEC];
494494

495-
let SubtargetPredicate = !if(P.HasExtSDWA, HasSDWA, DisableInst);
496-
let AssemblerPredicate = !if(P.HasExtSDWA, HasSDWA, DisableInst);
495+
let SubtargetPredicate = HasSDWA;
496+
let AssemblerPredicate = HasSDWA;
497497
let AsmVariantName = !if(P.HasExtSDWA, AMDGPUAsmVariants.SDWA,
498498
AMDGPUAsmVariants.Disable);
499499
let DecoderNamespace = "SDWA";
@@ -542,8 +542,8 @@ class Base_VOP_SDWA9_Real <VOP_SDWA_Pseudo ps> :
542542
let Constraints = ps.Constraints;
543543
let DisableEncoding = ps.DisableEncoding;
544544

545-
let SubtargetPredicate = !if(ps.Pfl.HasExtSDWA9, HasSDWA9, DisableInst);
546-
let AssemblerPredicate = !if(ps.Pfl.HasExtSDWA9, HasSDWA9, DisableInst);
545+
let SubtargetPredicate = HasSDWA9;
546+
let AssemblerPredicate = HasSDWA9;
547547
let AsmVariantName = !if(ps.Pfl.HasExtSDWA9, AMDGPUAsmVariants.SDWA9,
548548
AMDGPUAsmVariants.Disable);
549549
let DecoderNamespace = "SDWA9";
@@ -561,8 +561,8 @@ class VOP_SDWA9_Real <VOP_SDWA_Pseudo ps> :
561561
SIMCInstr <ps.PseudoInstr, SIEncodingFamily.SDWA9>;
562562

563563
class Base_VOP_SDWA10_Real<VOP_SDWA_Pseudo ps> : Base_VOP_SDWA9_Real<ps> {
564-
let SubtargetPredicate = !if(ps.Pfl.HasExtSDWA9, HasSDWA10, DisableInst);
565-
let AssemblerPredicate = !if(ps.Pfl.HasExtSDWA9, HasSDWA10, DisableInst);
564+
let SubtargetPredicate = HasSDWA10;
565+
let AssemblerPredicate = HasSDWA10;
566566
let DecoderNamespace = "SDWA10";
567567
}
568568

@@ -615,7 +615,7 @@ class VOP_DPP_Pseudo <string OpName, VOPProfile P, list<dag> pattern=[]> :
615615

616616
let AsmMatchConverter = !if(!eq(P.HasModifiers,1), "cvtDPP", "");
617617
let SubtargetPredicate = HasDPP;
618-
let AssemblerPredicate = !if(P.HasExtDPP, HasDPP, DisableInst);
618+
let AssemblerPredicate = HasDPP;
619619
let AsmVariantName = !if(P.HasExtDPP, AMDGPUAsmVariants.DPP,
620620
AMDGPUAsmVariants.Disable);
621621
let Constraints = !if(P.NumSrcArgs, P.TieRegDPP # " = $vdst", "");
@@ -670,7 +670,7 @@ class VOP_DPP <string OpName, VOPProfile P, bit IsDPP16,
670670

671671
let AsmMatchConverter = !if(!eq(P.HasModifiers,1), "cvtDPP", "");
672672
let SubtargetPredicate = HasDPP;
673-
let AssemblerPredicate = !if(P.HasExtDPP, HasDPP, DisableInst);
673+
let AssemblerPredicate = HasDPP;
674674
let AsmVariantName = !if(P.HasExtDPP, AMDGPUAsmVariants.DPP,
675675
AMDGPUAsmVariants.Disable);
676676
let Constraints = !if(P.NumSrcArgs, P.TieRegDPP # " = $vdst", "");
@@ -702,7 +702,7 @@ class VOP_DPP8<string OpName, VOPProfile P> :
702702

703703
let AsmMatchConverter = "cvtDPP8";
704704
let SubtargetPredicate = HasDPP8;
705-
let AssemblerPredicate = !if(P.HasExt, HasDPP8, DisableInst);
705+
let AssemblerPredicate = HasDPP8;
706706
let AsmVariantName = !if(P.HasExt, AMDGPUAsmVariants.DPP,
707707
AMDGPUAsmVariants.Disable);
708708
let Constraints = !if(P.NumSrcArgs, P.TieRegDPP # " = $vdst", "");

0 commit comments

Comments
 (0)