[llvm] [AMDGPU][True16] Add VOP1Inst_t16_with_profiles class (PR #92184)
Joe Nash via llvm-commits
llvm-commits at lists.llvm.org
Tue May 14 14:44:56 PDT 2024
https://github.com/Sisyph created https://github.com/llvm/llvm-project/pull/92184
NFC. Makes the VOP1Inst_t16 interface more generic to support future instructions cleanly.
>From 7cbb7f91ff079b239d822487796dc6feec987469 Mon Sep 17 00:00:00 2001
From: Joe Nash <joseph.nash at amd.com>
Date: Tue, 14 May 2024 17:40:49 -0400
Subject: [PATCH] [AMDGPU][True16] Add VOP1Inst_t16_with_profiles class
NFC. Makes the VOP1Inst_t16 interface more generic to support future
instructions cleanly.
---
llvm/lib/Target/AMDGPU/VOP1Instructions.td | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/Target/AMDGPU/VOP1Instructions.td b/llvm/lib/Target/AMDGPU/VOP1Instructions.td
index 4a56fad0cd603..b875ddc62a7a0 100644
--- a/llvm/lib/Target/AMDGPU/VOP1Instructions.td
+++ b/llvm/lib/Target/AMDGPU/VOP1Instructions.td
@@ -153,20 +153,26 @@ multiclass VOP1Inst <string opName, VOPProfile P,
def : LetDummies, AMDGPUMnemonicAlias<opName#"_dpp", opName, AMDGPUAsmVariants.DPP>;
}
-multiclass VOP1Inst_t16<string opName,
+multiclass VOP1Inst_t16_with_profiles<string opName,
VOPProfile P,
+ VOPProfile P_t16,
+ VOPProfile P_fake16,
SDPatternOperator node = null_frag> {
let OtherPredicates = [NotHasTrue16BitInsts, Has16BitInsts] in {
defm NAME : VOP1Inst<opName, P, node>;
}
let OtherPredicates = [UseRealTrue16Insts] in {
- defm _t16 : VOP1Inst<opName#"_t16", VOPProfile_True16<P>, node>;
+ defm _t16 : VOP1Inst<opName#"_t16", P_t16, node>;
}
let OtherPredicates = [UseFakeTrue16Insts] in {
- defm _fake16 : VOP1Inst<opName#"_fake16", VOPProfile_Fake16<P>, node>;
+ defm _fake16 : VOP1Inst<opName#"_fake16", P_fake16, node>;
}
}
+multiclass VOP1Inst_t16<string opName, VOPProfile P,
+ SDPatternOperator node = null_frag> :
+ VOP1Inst_t16_with_profiles<opName, P, VOPProfile_True16<P>, VOPProfile_Fake16<P>, node>;
+
// Special profile for instructions which have clamp
// and output modifiers (but have no input modifiers)
class VOPProfileI2F<ValueType dstVt, ValueType srcVt> :
More information about the llvm-commits
mailing list