Skip to content

[AMDGPU] simplify VOP3_Real definitions. NFC. #89656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions llvm/lib/Target/AMDGPU/VOPInstructions.td
Original file line number Diff line number Diff line change
Expand Up @@ -1388,14 +1388,15 @@ multiclass VOP3_Real_Base<GFXGen Gen, bits<10> op, string opName = NAME,
bit isSingle = 0> {
defvar ps = !cast<VOP_Pseudo>(opName#"_e64");
let IsSingle = !or(isSingle, ps.Pfl.IsSingle) in {
if ps.Pfl.HasOpSel then
def _e64#Gen.Suffix :
VOP3_Real_Gen<ps, Gen>,
VOP3OpSel_gfx11_gfx12<op, ps.Pfl>;
if !not(ps.Pfl.HasOpSel) then
def _e64#Gen.Suffix :
VOP3_Real_Gen<ps, Gen>,
VOP3e_gfx11_gfx12<op, ps.Pfl>;
if ps.Pfl.HasOpSel then {
def _e64#Gen.Suffix :
VOP3_Real_Gen<ps, Gen>,
VOP3OpSel_gfx11_gfx12<op, ps.Pfl>;
} else {
def _e64#Gen.Suffix :
VOP3_Real_Gen<ps, Gen>,
VOP3e_gfx11_gfx12<op, ps.Pfl>;
}
}
}

Expand All @@ -1418,15 +1419,14 @@ multiclass VOP3_Real_with_name<GFXGen Gen, bits<10> op, string opName,
def _e64#Gen.Suffix :
VOP3_Real_Gen<ps, Gen>,
VOP3FP8OpSel_gfx11_gfx12<op, ps.Pfl>;
} else if ps.Pfl.HasOpSel then {
def _e64#Gen.Suffix :
VOP3_Real_Gen<ps, Gen>,
VOP3OpSel_gfx11_gfx12<op, ps.Pfl>;
} else {
if ps.Pfl.HasOpSel then
def _e64#Gen.Suffix :
VOP3_Real_Gen<ps, Gen>,
VOP3OpSel_gfx11_gfx12<op, ps.Pfl>;
if !not(ps.Pfl.HasOpSel) then
def _e64#Gen.Suffix :
VOP3_Real_Gen<ps, Gen>,
VOP3e_gfx11_gfx12<op, ps.Pfl>;
def _e64#Gen.Suffix :
VOP3_Real_Gen<ps, Gen>,
VOP3e_gfx11_gfx12<op, ps.Pfl>;
}
}
def Gen.Suffix#"_VOP3_alias" : MnemonicAlias<ps.Mnemonic, asmName>, Requires<[Gen.AssemblerPredicate]>, LetDummies;
Expand Down