[llvm] [RISCV][MC] Prioritize features in MultiMismatchFallback (PR #215737)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 23:56:09 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/utils/TableGen/AsmMatcherEmitter.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 4f92efb96..db876327a 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -4135,9 +4135,11 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
     OS << "    if (MultipleInvalidOperands) {\n";
     OS << "      DEBUG_WITH_TYPE(\"asm-matcher\", dbgs() << \"Opcode result: "
           "multiple \"\n";
-    OS << "                                               \"operand mismatches, "
+    OS << "                                               \"operand "
+          "mismatches, "
           "ignoring \"\n";
-    OS << "                                               \"this opcode\\n\");\n";
+    OS << "                                               \"this "
+          "opcode\\n\");\n";
     OS << "      // Too many invalid operands to report a single near-miss;\n";
     OS << "      // keep the first one as a fallback in case no opcode\n";
     OS << "      // matches more closely.\n";
@@ -4158,11 +4160,14 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
       OS << "    if (!OperandsValid) {\n";
     OS << "      DEBUG_WITH_TYPE(\"asm-matcher\", dbgs() << \"Opcode result: "
           "multiple \"\n";
-    OS << "                                               \"operand mismatches, "
+    OS << "                                               \"operand "
+          "mismatches, "
           "ignoring \"\n";
-    OS << "                                               \"this opcode\\n\");\n";
+    OS << "                                               \"this "
+          "opcode\\n\");\n";
     if (ReportMultipleNearMisses) {
-      OS << "      // Too many invalid operands to report a single near-miss;\n";
+      OS << "      // Too many invalid operands to report a single "
+            "near-miss;\n";
       OS << "      // keep the first one as a fallback in case no opcode\n";
       OS << "      // matches more closely.\n";
       OS << "      if (OperandNearMiss)\n";

``````````

</details>


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


More information about the llvm-commits mailing list