[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
Mon Mar 4 01:36:25 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:

Hmm thank you for your insight here. It definitely wasn't working without this, but perhaps that was a bug in a different area and not what I thought it was. 

I think maybe this bug stems from `ARMAsmParser::parseFPImm` in several situations produces an error rather than `NoMatch`. I will see if I can change this to get around this issue a different way. 

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


More information about the llvm-commits mailing list