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

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 06:44:37 PST 2024


================
@@ -2019,7 +2058,7 @@ emitConvertFuncs(CodeGenTarget &Target, StringRef ClassName,
   CvtOS
       << "                              std::begin(TiedAsmOperandTable)) &&\n";
   CvtOS << "             \"Tied operand not found\");\n";
-  CvtOS << "      unsigned TiedResOpnd = TiedAsmOperandTable[OpIdx][0];\n";
+  CvtOS << "      unsigned TiedResOpnd = TiedAsmOperandTable[*(p + 1)][0];\n";
----------------
s-barannikov wrote:

I guess the assert above should also be fixed.
And we shouldn't be calculating OpIdx before the switch because it can lead to OOB access...


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


More information about the llvm-commits mailing list