Skip to content

Commit 8f00219

Browse files
committedOct 8, 2019
[AMDGPU] Disable unused gfx10 dpp instructions
Inhibit generation of unused real dpp instructions on gfx10 just like it is done on other subtargets. This does not change anything because these are illegal anyway and not accepted, but it does reduce the number of instruction definitions generated. Differential Revision: https://reviews.llvm.org/D68607 llvm-svn: 374083
1 parent ea63775 commit 8f00219

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
 

‎llvm/lib/Target/AMDGPU/VOP1Instructions.td

+2
Original file line numberDiff line numberDiff line change
@@ -506,11 +506,13 @@ let AssemblerPredicate = isGFX10Plus, DecoderNamespace = "GFX10" in {
506506
}
507507
}
508508
multiclass VOP1_Real_dpp_gfx10<bits<9> op> {
509+
foreach _ = BoolToList<!cast<VOP1_Pseudo>(NAME#"_e32").Pfl.HasExtDPP>.ret in
509510
def _dpp_gfx10 : VOP1_DPP16<op{7-0}, !cast<VOP1_Pseudo>(NAME#"_e32")> {
510511
let DecoderNamespace = "SDWA10";
511512
}
512513
}
513514
multiclass VOP1_Real_dpp8_gfx10<bits<9> op> {
515+
foreach _ = BoolToList<!cast<VOP1_Pseudo>(NAME#"_e32").Pfl.HasExtDPP>.ret in
514516
def _dpp8_gfx10 : VOP1_DPP8<op{7-0}, !cast<VOP1_Pseudo>(NAME#"_e32")> {
515517
let DecoderNamespace = "DPP8";
516518
}

‎llvm/lib/Target/AMDGPU/VOP2Instructions.td

+6
Original file line numberDiff line numberDiff line change
@@ -939,11 +939,13 @@ let AssemblerPredicate = isGFX10Plus, DecoderNamespace = "GFX10" in {
939939
}
940940
}
941941
multiclass VOP2_Real_dpp_gfx10<bits<6> op> {
942+
foreach _ = BoolToList<!cast<VOP2_Pseudo>(NAME#"_e32").Pfl.HasExtDPP>.ret in
942943
def _dpp_gfx10 : VOP2_DPP16<op, !cast<VOP2_Pseudo>(NAME#"_e32")> {
943944
let DecoderNamespace = "SDWA10";
944945
}
945946
}
946947
multiclass VOP2_Real_dpp8_gfx10<bits<6> op> {
948+
foreach _ = BoolToList<!cast<VOP2_Pseudo>(NAME#"_e32").Pfl.HasExtDPP>.ret in
947949
def _dpp8_gfx10 : VOP2_DPP8<op, !cast<VOP2_Pseudo>(NAME#"_e32")> {
948950
let DecoderNamespace = "DPP8";
949951
}
@@ -981,13 +983,15 @@ let AssemblerPredicate = isGFX10Plus, DecoderNamespace = "GFX10" in {
981983
}
982984
multiclass VOP2_Real_dpp_gfx10_with_name<bits<6> op, string opName,
983985
string asmName> {
986+
foreach _ = BoolToList<!cast<VOP2_Pseudo>(opName#"_e32").Pfl.HasExtDPP>.ret in
984987
def _dpp_gfx10 : VOP2_DPP16<op, !cast<VOP2_Pseudo>(opName#"_e32")> {
985988
VOP2_Pseudo ps = !cast<VOP2_Pseudo>(opName#"_e32");
986989
let AsmString = asmName # ps.Pfl.AsmDPP16;
987990
}
988991
}
989992
multiclass VOP2_Real_dpp8_gfx10_with_name<bits<6> op, string opName,
990993
string asmName> {
994+
foreach _ = BoolToList<!cast<VOP2_Pseudo>(opName#"_e32").Pfl.HasExtDPP>.ret in
991995
def _dpp8_gfx10 : VOP2_DPP8<op, !cast<VOP2_Pseudo>(opName#"_e32")> {
992996
VOP2_Pseudo ps = !cast<VOP2_Pseudo>(opName#"_e32");
993997
let AsmString = asmName # ps.Pfl.AsmDPP8;
@@ -1018,12 +1022,14 @@ let AssemblerPredicate = isGFX10Plus, DecoderNamespace = "GFX10" in {
10181022
let AsmString = asmName # !subst(", vcc", "", Ps.AsmOperands);
10191023
let DecoderNamespace = "SDWA10";
10201024
}
1025+
foreach _ = BoolToList<!cast<VOP2_Pseudo>(opName#"_e32").Pfl.HasExtDPP>.ret in
10211026
def _dpp_gfx10 :
10221027
VOP2_DPP16<op, !cast<VOP2_Pseudo>(opName#"_e32"), asmName> {
10231028
string AsmDPP = !cast<VOP2_Pseudo>(opName#"_e32").Pfl.AsmDPP16;
10241029
let AsmString = asmName # !subst(", vcc", "", AsmDPP);
10251030
let DecoderNamespace = "SDWA10";
10261031
}
1032+
foreach _ = BoolToList<!cast<VOP2_Pseudo>(opName#"_e32").Pfl.HasExtDPP>.ret in
10271033
def _dpp8_gfx10 :
10281034
VOP2_DPP8<op, !cast<VOP2_Pseudo>(opName#"_e32"), asmName> {
10291035
string AsmDPP8 = !cast<VOP2_Pseudo>(opName#"_e32").Pfl.AsmDPP8;

0 commit comments

Comments
 (0)