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

Alfie Richards via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 08:30:19 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)
----------------
AlfieRichardsArm wrote:

The reason for this flag is because I wanted to be explicit that this is what I was doing and this is behavior I am relying on. The inverse is also possible (always omitting optional operands) and should be as simple as flipping this flag.

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


More information about the llvm-commits mailing list