Skip to content

Commit

Permalink
[AMDGPU] Use opName instead of PseudoName in VOP2 multiclasses. NFC.
Browse files Browse the repository at this point in the history
This is just for consistency with all other instruction multiclasses
that pass around pseudo names as arguments.
  • Loading branch information
jayfoad committed Jun 28, 2021
1 parent d5402a2 commit 75cacc6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions llvm/lib/Target/AMDGPU/VOP2Instructions.td
Expand Up @@ -1278,20 +1278,20 @@ let AssemblerPredicate = isGFX6GFX7, DecoderNamespace = "GFX6GFX7" in {
VOP2_Real<!cast<VOP2_Pseudo>(NAME), SIEncodingFamily.SI>,
VOP2_MADKe<op{5-0}, !cast<VOP2_Pseudo>(NAME).Pfl>;
}
multiclass VOP2_Real_e32_gfx6_gfx7<bits<6> op, string PseudoName = NAME> {
multiclass VOP2_Real_e32_gfx6_gfx7<bits<6> op, string opName = NAME> {
def _e32_gfx6_gfx7 :
VOP2_Real<!cast<VOP2_Pseudo>(PseudoName#"_e32"), SIEncodingFamily.SI>,
VOP2e<op{5-0}, !cast<VOP2_Pseudo>(PseudoName#"_e32").Pfl>;
VOP2_Real<!cast<VOP2_Pseudo>(opName#"_e32"), SIEncodingFamily.SI>,
VOP2e<op{5-0}, !cast<VOP2_Pseudo>(opName#"_e32").Pfl>;
}
multiclass VOP2_Real_e64_gfx6_gfx7<bits<6> op, string PseudoName = NAME> {
multiclass VOP2_Real_e64_gfx6_gfx7<bits<6> op, string opName = NAME> {
def _e64_gfx6_gfx7 :
VOP3_Real<!cast<VOP3_Pseudo>(PseudoName#"_e64"), SIEncodingFamily.SI>,
VOP3e_gfx6_gfx7<{1, 0, 0, op{5-0}}, !cast<VOP3_Pseudo>(PseudoName#"_e64").Pfl>;
VOP3_Real<!cast<VOP3_Pseudo>(opName#"_e64"), SIEncodingFamily.SI>,
VOP3e_gfx6_gfx7<{1, 0, 0, op{5-0}}, !cast<VOP3_Pseudo>(opName#"_e64").Pfl>;
}
multiclass VOP2be_Real_e64_gfx6_gfx7<bits<6> op, string PseudoName = NAME> {
multiclass VOP2be_Real_e64_gfx6_gfx7<bits<6> op, string opName = NAME> {
def _e64_gfx6_gfx7 :
VOP3_Real<!cast<VOP3_Pseudo>(PseudoName#"_e64"), SIEncodingFamily.SI>,
VOP3be_gfx6_gfx7<{1, 0, 0, op{5-0}}, !cast<VOP3_Pseudo>(PseudoName#"_e64").Pfl>;
VOP3_Real<!cast<VOP3_Pseudo>(opName#"_e64"), SIEncodingFamily.SI>,
VOP3be_gfx6_gfx7<{1, 0, 0, op{5-0}}, !cast<VOP3_Pseudo>(opName#"_e64").Pfl>;
}
} // End AssemblerPredicate = isGFX6GFX7, DecoderNamespace = "GFX6GFX7"

Expand All @@ -1308,16 +1308,16 @@ multiclass VOP2be_Real_gfx6_gfx7<bits<6> op> :
VOP2_Real_e32_gfx6_gfx7<op>, VOP2be_Real_e64_gfx6_gfx7<op>;

multiclass VOP2be_Real_gfx6_gfx7_with_name<bits<6> op,
string PseudoName, string asmName> {
defvar ps32 = !cast<VOP2_Pseudo>(PseudoName#"_e32");
defvar ps64 = !cast<VOP3_Pseudo>(PseudoName#"_e64");
string opName, string asmName> {
defvar ps32 = !cast<VOP2_Pseudo>(opName#"_e32");
defvar ps64 = !cast<VOP3_Pseudo>(opName#"_e64");

let AsmString = asmName # ps32.AsmOperands in {
defm "" : VOP2_Real_e32_gfx6_gfx7<op, PseudoName>;
defm "" : VOP2_Real_e32_gfx6_gfx7<op, opName>;
}

let AsmString = asmName # ps64.AsmOperands in {
defm "" : VOP2be_Real_e64_gfx6_gfx7<op, PseudoName>;
defm "" : VOP2be_Real_e64_gfx6_gfx7<op, opName>;
}
}

Expand Down

0 comments on commit 75cacc6

Please sign in to comment.