Skip to content

Commit 3ca428c

Browse files
authored
[AMDGPU][True16] Add VOP1Inst_t16_with_profiles class (#92184)
NFC. Makes the VOP1Inst_t16 interface more generic to support future instructions cleanly.
1 parent 844355a commit 3ca428c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

llvm/lib/Target/AMDGPU/VOP1Instructions.td

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,20 +153,26 @@ multiclass VOP1Inst <string opName, VOPProfile P,
153153
def : LetDummies, AMDGPUMnemonicAlias<opName#"_dpp", opName, AMDGPUAsmVariants.DPP>;
154154
}
155155

156-
multiclass VOP1Inst_t16<string opName,
156+
multiclass VOP1Inst_t16_with_profiles<string opName,
157157
VOPProfile P,
158+
VOPProfile P_t16,
159+
VOPProfile P_fake16,
158160
SDPatternOperator node = null_frag> {
159161
let OtherPredicates = [NotHasTrue16BitInsts, Has16BitInsts] in {
160162
defm NAME : VOP1Inst<opName, P, node>;
161163
}
162164
let OtherPredicates = [UseRealTrue16Insts] in {
163-
defm _t16 : VOP1Inst<opName#"_t16", VOPProfile_True16<P>, node>;
165+
defm _t16 : VOP1Inst<opName#"_t16", P_t16, node>;
164166
}
165167
let OtherPredicates = [UseFakeTrue16Insts] in {
166-
defm _fake16 : VOP1Inst<opName#"_fake16", VOPProfile_Fake16<P>, node>;
168+
defm _fake16 : VOP1Inst<opName#"_fake16", P_fake16, node>;
167169
}
168170
}
169171

172+
multiclass VOP1Inst_t16<string opName, VOPProfile P,
173+
SDPatternOperator node = null_frag> :
174+
VOP1Inst_t16_with_profiles<opName, P, VOPProfile_True16<P>, VOPProfile_Fake16<P>, node>;
175+
170176
// Special profile for instructions which have clamp
171177
// and output modifiers (but have no input modifiers)
172178
class VOPProfileI2F<ValueType dstVt, ValueType srcVt> :

0 commit comments

Comments
 (0)