[llvm] [ARM][TableGen][MC] Change the ARM mnemonic operands to be optional for ASM parsing (PR #83436)

Ivan Kosarev via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 04:51:21 PST 2024


================
@@ -1474,7 +1513,7 @@ void AsmMatcherInfo::buildOperandMatchInfo() {
         OperandMask |= maskTrailingOnes<unsigned>(NumOptionalOps + 1)
                        << (i - NumOptionalOps);
       }
-      if (Op.Class->IsOptional)
+      if (Op.Class->IsOptional && Op.Class->OptionalShouldOffsetCustomParsers)
----------------
kosarev wrote:

I struggle to understand why this is necessary. By the look of it, the flag makes the operand effectively non-optional. Can you give an example demonstrating the problem this flag addresses?

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


More information about the llvm-commits mailing list