================
@@ -8497,26 +8467,25 @@ ParseStatus 
AArch64AsmParser::tryParseGPRSeqPair(OperandVector &Operands) {
   MCRegister FirstReg;
   ParseStatus Res = tryParseScalarRegister(FirstReg);
   if (!Res.isSuccess())
-    return Error(S, "expected first even register of a consecutive same-size "
-                    "even/odd register pair");
+    return Error(S, FirstRegExpected);
 
   const MCRegisterClass &WRegClass =
       getAArch64MCRegisterClass(AArch64::GPR32RegClassID);
   const MCRegisterClass &XRegClass =
       getAArch64MCRegisterClass(AArch64::GPR64RegClassID);
 
-  bool isXReg = XRegClass.contains(FirstReg),
-       isWReg = WRegClass.contains(FirstReg);
-  if (!isXReg && !isWReg)
-    return Error(S, "expected first even register of a consecutive same-size "
-                    "even/odd register pair");
+  bool IsXZR = FirstReg == AArch64::XZR;
+  bool IsXReg = XRegClass.contains(FirstReg);
+  bool IsWReg = WRegClass.contains(FirstReg);
+  bool IsXZRPair = AllowXZRPair && IsXZR;
+  if (AllowXZRPair ? (!IsXReg && !IsXZRPair) : (!IsXReg && !IsWReg))
----------------
jthackray wrote:

These variables are all used later on in the file, at line 8531, etc. So I 
think I'll skip on this suggestion, since we still need them.

https://github.com/llvm/llvm-project/pull/182410
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to