@@ -280,8 +280,9 @@ class AMDGPUOperand : public MCParsedAsmOperand {
280
280
return isRegOrImmWithInputMods (AMDGPU::VS_32RegClassID, MVT::i16 );
281
281
}
282
282
283
- bool isRegOrImmWithIntT16InputMods () const {
284
- return isRegOrImmWithInputMods (AMDGPU::VS_16RegClassID, MVT::i16 );
283
+ template <bool IsFake16> bool isRegOrImmWithIntT16InputMods () const {
284
+ return isRegOrImmWithInputMods (
285
+ IsFake16 ? AMDGPU::VS_32RegClassID : AMDGPU::VS_16RegClassID, MVT::i16 );
285
286
}
286
287
287
288
bool isRegOrImmWithInt32InputMods () const {
@@ -292,6 +293,11 @@ class AMDGPUOperand : public MCParsedAsmOperand {
292
293
return isRegOrInline (AMDGPU::VS_32RegClassID, MVT::i16 );
293
294
}
294
295
296
+ template <bool IsFake16> bool isRegOrInlineImmWithIntT16InputMods () const {
297
+ return isRegOrInline (
298
+ IsFake16 ? AMDGPU::VS_32RegClassID : AMDGPU::VS_16RegClassID, MVT::i16 );
299
+ }
300
+
295
301
bool isRegOrInlineImmWithInt32InputMods () const {
296
302
return isRegOrInline (AMDGPU::VS_32RegClassID, MVT::i32 );
297
303
}
@@ -304,8 +310,9 @@ class AMDGPUOperand : public MCParsedAsmOperand {
304
310
return isRegOrImmWithInputMods (AMDGPU::VS_32RegClassID, MVT::f16 );
305
311
}
306
312
307
- bool isRegOrImmWithFPT16InputMods () const {
308
- return isRegOrImmWithInputMods (AMDGPU::VS_16RegClassID, MVT::f16 );
313
+ template <bool IsFake16> bool isRegOrImmWithFPT16InputMods () const {
314
+ return isRegOrImmWithInputMods (
315
+ IsFake16 ? AMDGPU::VS_32RegClassID : AMDGPU::VS_16RegClassID, MVT::f16 );
309
316
}
310
317
311
318
bool isRegOrImmWithFP32InputMods () const {
@@ -354,6 +361,7 @@ class AMDGPUOperand : public MCParsedAsmOperand {
354
361
}
355
362
356
363
bool isVRegWithInputMods () const ;
364
+ template <bool IsFake16> bool isT16_Lo128VRegWithInputMods () const ;
357
365
template <bool IsFake16> bool isT16VRegWithInputMods () const ;
358
366
359
367
bool isSDWAOperand (MVT type) const ;
@@ -515,7 +523,7 @@ class AMDGPUOperand : public MCParsedAsmOperand {
515
523
return isRegOrInlineNoMods (AMDGPU::VS_64RegClassID, MVT::i64 );
516
524
}
517
525
518
- bool isVCSrcTB16 () const {
526
+ bool isVCSrcT_b16 () const {
519
527
return isRegOrInlineNoMods (AMDGPU::VS_16RegClassID, MVT::i16 );
520
528
}
521
529
@@ -545,7 +553,11 @@ class AMDGPUOperand : public MCParsedAsmOperand {
545
553
return isRegOrInlineNoMods (AMDGPU::VS_16RegClassID, MVT::bf16 );
546
554
}
547
555
548
- bool isVCSrcTF16 () const {
556
+ bool isVCSrcT_f16 () const {
557
+ return isRegOrInlineNoMods (AMDGPU::VS_16RegClassID, MVT::f16 );
558
+ }
559
+
560
+ bool isVCSrcT_bf16 () const {
549
561
return isRegOrInlineNoMods (AMDGPU::VS_16RegClassID, MVT::f16 );
550
562
}
551
563
@@ -583,7 +595,7 @@ class AMDGPUOperand : public MCParsedAsmOperand {
583
595
584
596
bool isVSrc_b64 () const { return isVCSrcF64 () || isLiteralImm (MVT::i64 ); }
585
597
586
- bool isVSrcT_b16 () const { return isVCSrcTB16 () || isLiteralImm (MVT::i16 ); }
598
+ bool isVSrcT_b16 () const { return isVCSrcT_b16 () || isLiteralImm (MVT::i16 ); }
587
599
588
600
bool isVSrcT_b16_Lo128 () const {
589
601
return isVCSrcTB16_Lo128 () || isLiteralImm (MVT::i16 );
@@ -617,7 +629,7 @@ class AMDGPUOperand : public MCParsedAsmOperand {
617
629
618
630
bool isVSrcT_bf16 () const { return isVCSrcTBF16 () || isLiteralImm (MVT::bf16 ); }
619
631
620
- bool isVSrcT_f16 () const { return isVCSrcTF16 () || isLiteralImm (MVT::f16 ); }
632
+ bool isVSrcT_f16 () const { return isVCSrcT_f16 () || isLiteralImm (MVT::f16 ); }
621
633
622
634
bool isVSrcT_bf16_Lo128 () const {
623
635
return isVCSrcTBF16_Lo128 () || isLiteralImm (MVT::bf16 );
@@ -2162,11 +2174,17 @@ bool AMDGPUOperand::isVRegWithInputMods() const {
2162
2174
AsmParser->getFeatureBits ()[AMDGPU::FeatureDPALU_DPP]);
2163
2175
}
2164
2176
2165
- template <bool IsFake16> bool AMDGPUOperand::isT16VRegWithInputMods () const {
2177
+ template <bool IsFake16>
2178
+ bool AMDGPUOperand::isT16_Lo128VRegWithInputMods () const {
2166
2179
return isRegClass (IsFake16 ? AMDGPU::VGPR_32_Lo128RegClassID
2167
2180
: AMDGPU::VGPR_16_Lo128RegClassID);
2168
2181
}
2169
2182
2183
+ template <bool IsFake16> bool AMDGPUOperand::isT16VRegWithInputMods () const {
2184
+ return isRegClass (IsFake16 ? AMDGPU::VGPR_32RegClassID
2185
+ : AMDGPU::VGPR_16RegClassID);
2186
+ }
2187
+
2170
2188
bool AMDGPUOperand::isSDWAOperand (MVT type) const {
2171
2189
if (AsmParser->isVI ())
2172
2190
return isVReg32 ();
0 commit comments