[llvm-branch-commits] [llvm] [AArch64][llvm] Fix constant expressions in CMPBR immediate aliases (PR #230050)

Jonathan Thackray via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 9 03:56:43 PDT 2026


================
@@ -486,21 +496,11 @@ def CmpBranchBExtOperand
 def CmpBranchHExtOperand
     : ComplexPattern<i32, 2, "SelectCmpBranchExtOperand<false>", []> {}
 
-def UImm6Plus1Operand : AsmOperandClass {
-  let Name = "UImm6P1";
-  let DiagnosticType = "InvalidImm1_64";
-  let RenderMethod = "addImmOperands";
-  let ParserMethod = "tryParseAdjImm0_63<-1>";
-  let PredicateMethod = "isImmInRange<0,63>";
-}
+def UImm6Plus1Operand
+    : AdjImmAsmOperand<"UImm6P1", "InvalidImm1_64", -1, 0, 63>;
 
-def UImm6Minus1Operand : AsmOperandClass {
-  let Name = "UImm6M1";
-  let DiagnosticType = "InvalidImmM1_62";
-  let RenderMethod = "addImmOperands";
-  let ParserMethod = "tryParseAdjImm0_63<1>";
-  let PredicateMethod = "isImmInRange<0,63>";
-}
+def UImm6Minus1Operand
+    : AdjImmAsmOperand<"UImm6M1", "InvalidImmM1_62", 1, 0, 63>;
----------------
jthackray wrote:

Thanks, done

https://github.com/llvm/llvm-project/pull/230050


More information about the llvm-branch-commits mailing list