@@ -347,6 +347,8 @@ class AMDGPUOperand : public MCParsedAsmOperand {
347
347
return isImm () && Imm.Type == ImmT;
348
348
}
349
349
350
+ bool isImmLiteral () const { return isImmTy (ImmTyNone); }
351
+
350
352
bool isImmModifier () const {
351
353
return isImm () && Imm.Type != ImmTyNone;
352
354
}
@@ -7940,7 +7942,7 @@ void AMDGPUAsmParser::cvtIntersectRay(MCInst &Inst,
7940
7942
// ===----------------------------------------------------------------------===//
7941
7943
7942
7944
bool AMDGPUOperand::isSMRDOffset8 () const {
7943
- return isImm () && isUInt<8 >(getImm ());
7945
+ return isImmLiteral () && isUInt<8 >(getImm ());
7944
7946
}
7945
7947
7946
7948
bool AMDGPUOperand::isSMEMOffset () const {
@@ -7951,7 +7953,7 @@ bool AMDGPUOperand::isSMEMOffset() const {
7951
7953
bool AMDGPUOperand::isSMRDLiteralOffset () const {
7952
7954
// 32-bit literals are only supported on CI and we only want to use them
7953
7955
// when the offset is > 8-bits.
7954
- return isImm () && !isUInt<8 >(getImm ()) && isUInt<32 >(getImm ());
7956
+ return isImmLiteral () && !isUInt<8 >(getImm ()) && isUInt<32 >(getImm ());
7955
7957
}
7956
7958
7957
7959
AMDGPUOperand::Ptr AMDGPUAsmParser::defaultSMRDOffset8 () const {
@@ -8439,11 +8441,11 @@ bool AMDGPUOperand::isABID() const {
8439
8441
}
8440
8442
8441
8443
bool AMDGPUOperand::isS16Imm () const {
8442
- return isImm () && (isInt<16 >(getImm ()) || isUInt<16 >(getImm ()));
8444
+ return isImmLiteral () && (isInt<16 >(getImm ()) || isUInt<16 >(getImm ()));
8443
8445
}
8444
8446
8445
8447
bool AMDGPUOperand::isU16Imm () const {
8446
- return isImm () && isUInt<16 >(getImm ());
8448
+ return isImmLiteral () && isUInt<16 >(getImm ());
8447
8449
}
8448
8450
8449
8451
// ===----------------------------------------------------------------------===//
0 commit comments