[llvm] [AMDGPU][AsmParser] Do not use predicates for validation of NamedIntOperands. (PR #90251)
Ivan Kosarev via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 13:29:52 PDT 2024
================
@@ -1103,25 +1107,37 @@ let DefaultValue = "0xf" in {
def DppRowMask : NamedIntOperand<i32, "row_mask">;
def DppBankMask : NamedIntOperand<i32, "bank_mask">;
}
-def DppBoundCtrl : NamedIntOperand<i1, "bound_ctrl", 1, "DppBoundCtrl",
- "[this] (int64_t &BC) -> bool { return convertDppBoundCtrl(BC); }">;
+def DppBoundCtrl : NamedIntOperand<i1, "bound_ctrl"> {
+ let ConvertMethod = "[this] (int64_t &BC) -> bool { return convertDppBoundCtrl(BC); }";
+}
let DecoderMethod = "decodeDpp8FI" in
def Dpp8FI : NamedIntOperand<i32, "fi", 1, "DppFI">;
def Dpp16FI : NamedIntOperand<i32, "fi", 1, "DppFI">;
def blgp : CustomOperand<i32, 1, "BLGP">;
-def CBSZ : NamedIntOperand<i32, "cbsz">;
-def ABID : NamedIntOperand<i32, "abid">;
-
+def CBSZ : NamedIntOperand<i32, "cbsz"> {
+ let Validator = "isUInt<3>";
----------------
kosarev wrote:
I wanted to not go that far in this patch and give it some time to settle and see how it works with other kinds of operands, like `NamedBitOperand`, etc. Shouldn't be hard to do that later, if needed?
https://github.com/llvm/llvm-project/pull/90251
More information about the llvm-commits
mailing list