Skip to content

[llvm-exegesis] Add did-you-mean hint for unknown opcodes - #203463

Merged
mshockwave merged 3 commits into
llvm:mainfrom
quanyeyang:fix/issue-203199
Jun 17, 2026
Merged

mshockwave merged 3 commits into
llvm:mainfrom
quanyeyang:fix/issue-203199

Conversation

@quanyeyang

Copy link
Copy Markdown
Contributor

Fixes #203199

When skipping a benchmark entry with an unknown opcode name, suggest the
nearest matching opcode if the edit distance is <= 1 (similar to
OptTable::findNearest).

Example:

warning: skipping benchmark entry: No opcode with name 'VADDPDYrrr' - did you mean 'VADDPDYrr' ?

And Tested with:

  • llvm-lit llvm/test/tools/llvm-exegesis/X86/analysis-unknown-opcode-did-you-mean.test
  • llvm-lit llvm/test/tools/llvm-exegesis/X86/analysis-skip-unknown-opcode.test

@github-actions

Copy link
Copy Markdown

Hello @quanyeyang 👋

Thank you for submitting a Pull Request (PR) to the LLVM Project. Since this is your first PR, here are a few useful links covering our main contribution policies and review practices.

  • All contributions to LLVM must follow our LLVM AI Tool Use Policy. In particular, if you used AI while working on this PR, remember to add a note to the PR description.
  • The LLVM Code-Review Policy and Practices document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR.
  • Our LLVM Developer Policy describes our expectations for code quality, commit summaries and contains notes on our CI system.

Please reply to this message to confirm that you have read these policies, especially the LLVM AI Tool Use Policy, and that any AI tool usage has been noted in the PR description.


Frequently asked questions

How do I add reviewers?

This PR will be automatically labeled, and the relevant teams will be notified. For some parts of the project, reviewers may also be added automatically.

You can also add reviewers manually using the Reviewers section on this page. If you cannot use that section, it is probably because you do not have write permissions for the repository. In that case, you can request a review by tagging reviewers in a comment using @ followed by their GitHub username.

What if there are no comments?

If you have not received any comments on your PR after a week, you can request a review by pinging the PR with a comment such as “Ping”. The common courtesy ping rate is once a week. Please remember that you are asking for volunteer time from other developers.

Are any special GitHub settings required to contribute to LLVM?

We only require contributors to have a public email address associated with their GitHub commits, see this section of LLVM Developer Policy for details.


If you have questions, feel free to leave a comment on this PR, or ask on LLVM Discord or LLVM Discourse.

Thank you,
The LLVM Community

@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-tools-llvm-exegesis

Author: Quanye Yang (quanyeyang)

Changes

Fixes #203199

When skipping a benchmark entry with an unknown opcode name, suggest the
nearest matching opcode if the edit distance is <= 1 (similar to
OptTable::findNearest).

Example:

warning: skipping benchmark entry: No opcode with name 'VADDPDYrrr' - did you mean 'VADDPDYrr' ?

And Tested with:

  • llvm-lit llvm/test/tools/llvm-exegesis/X86/analysis-unknown-opcode-did-you-mean.test
  • llvm-lit llvm/test/tools/llvm-exegesis/X86/analysis-skip-unknown-opcode.test

Full diff: https://github.com/llvm/llvm-project/pull/203463.diff

2 Files Affected:

  • (added) llvm/test/tools/llvm-exegesis/X86/analysis-unknown-opcode-did-you-mean.test (+39)
  • (modified) llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp (+36-1)
diff --git a/llvm/test/tools/llvm-exegesis/X86/analysis-unknown-opcode-did-you-mean.test b/llvm/test/tools/llvm-exegesis/X86/analysis-unknown-opcode-did-you-mean.test
new file mode 100644
index 0000000000000..32fe6c965ba72
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/analysis-unknown-opcode-did-you-mean.test
@@ -0,0 +1,39 @@
+# Verify that skipping an entry with a misspelled opcode name includes a
+# "did you mean ?" hint when a close match exists.
+
+# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-clusters-output-file=- -analysis-clustering-epsilon=0.1 -analysis-inconsistency-epsilon=0.1 -analysis-numpoints=1 2> %t.err | FileCheck -check-prefix=CHECK-CLUSTERS %s
+# RUN: FileCheck -check-prefix=CHECK-WARN %s < %t.err
+
+# CHECK-WARN: warning: skipping benchmark entry: No opcode with name 'VADDPDYrrr' - did you mean 'VADDPDYrr' ?
+# CHECK-WARN: warning: skipped 1 benchmark entries that could not be parsed
+
+# CHECK-CLUSTERS: {{^}}cluster_id,opcode_name,config,sched_class,
+# CHECK-CLUSTERS-NEXT: {{^}}0,
+
+---
+mode:            uops
+key:
+  instructions:
+    - 'VADDPDYrrr RAX'
+  config:          ''
+  register_initial_values: []
+cpu_name:        znver3
+llvm_triple:     x86_64-pc-linux-gnu
+num_repetitions: 10000
+measurements: []
+error:           ''
+...
+---
+mode:            uops
+key:
+  instructions:
+    - 'CMOV16rm AX AX RDI i_0x1 %noreg i_0x0 %noreg i_0x0'
+  config:          ''
+  register_initial_values: []
+cpu_name:        znver3
+llvm_triple:     x86_64-pc-linux-gnu
+num_repetitions: 10000
+measurements:
+  - { key: NumMicroOps, value: 1.0146, per_snippet_value: 14.2044 }
+error:           ''
+...
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
index 1d1a376d3505b..018cbcb7941e4 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
@@ -16,11 +16,13 @@
 #include "llvm/ADT/bit.h"
 #include "llvm/ObjectYAML/YAML.h"
 #include "llvm/Support/Errc.h"
+#include "llvm/Support/Error.h"
 #include "llvm/Support/FileOutputBuffer.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Format.h"
 #include "llvm/Support/WithColor.h"
 #include "llvm/Support/raw_ostream.h"
+#include <optional>
 
 static constexpr char kIntegerPrefix[] = "i_0x";
 static constexpr char kDoublePrefix[] = "f_";
@@ -156,11 +158,44 @@ struct YamlContext {
     return InstrName;
   }
 
+  std::optional<StringRef> findNearestOpcodeName(StringRef InstrName) const {
+    unsigned BestDistance = 2;
+    StringRef Nearest;
+
+    for (const auto &Entry : OpcodeNameToOpcodeIdx) {
+      StringRef Candidate = Entry.getFirst();
+
+      size_t CandidateSize = Candidate.size();
+      size_t InstrSize = InstrName.size();
+      size_t AbsDiff = CandidateSize > InstrSize ? CandidateSize - InstrSize
+                                                 : InstrSize - CandidateSize;
+
+      if (AbsDiff >= BestDistance)
+        continue;
+
+      unsigned Distance =
+          InstrName.edit_distance(Candidate, /*AllowReplacements=*/true,
+                                  /*MaxEditDistance=*/BestDistance - 1);
+
+      if (Distance < BestDistance) {
+        BestDistance = Distance;
+        Nearest = Candidate;
+      }
+    }
+
+    if (BestDistance <= 1 && !Nearest.empty())
+      return Nearest;
+    return std::nullopt;
+  }
+
   unsigned getInstrOpcode(StringRef InstrName) {
     auto Iter = OpcodeNameToOpcodeIdx.find(InstrName);
     if (Iter != OpcodeNameToOpcodeIdx.end())
       return Iter->second;
-    ErrorStream << "No opcode with name '" << InstrName << "'\n";
+    ErrorStream << "No opcode with name '" << InstrName << "'";
+    if (std::optional<StringRef> Nearest = findNearestOpcodeName(InstrName))
+      ErrorStream << " - did you mean '" << *Nearest << "' ?";
+    ErrorStream << "\n";
     return 0;
   }
 


size_t CandidateSize = Candidate.size();
size_t InstrSize = InstrName.size();
size_t AbsDiff = CandidateSize > InstrSize ? CandidateSize - InstrSize

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::abs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In llvm/lib/Option/OptTable.cpp, OptTable::internalFindNearest(), the codes are like:

size_t CandidateSize = CandidatePrefix.size() + CandidateName.size(),
             NormalizedSize = NormalizedName.size();
size_t AbsDiff = CandidateSize > NormalizedSize
                           ? CandidateSize - NormalizedSize
                           : NormalizedSize - CandidateSize;

or we can change the codes like?

size_t AbsDiff = std::abs(static_cast<ptrdiff_t>(CandidateSize) -
                          static_cast<ptrdiff_t>(InstrSize));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

size_t AbsDiff = std::abs(static_cast<ptrdiff_t>(CandidateSize) -
static_cast<ptrdiff_t>(InstrSize));

yeah, something like this. I just checked LLVM's own llvm/Support/MathExtras.h, and I think llvm::AbsoluteDifference might be better because you can pass unsigned type: AbsoluteDifference(CandidateSize, InstrSize)

@mshockwave

mshockwave commented Jun 12, 2026 •

Copy link
Copy Markdown
Member

And Tested with:

  • llvm-lit llvm/test/tools/llvm-exegesis/X86/analysis-unknown-opcode-did-you-mean.test
  • llvm-lit llvm/test/tools/llvm-exegesis/X86/analysis-skip-unknown-opcode.test

I only saw changes on one of these test files. Do you forget to git add the other one?

@quanyeyang

Copy link
Copy Markdown
Contributor Author

And Tested with:

  • llvm-lit llvm/test/tools/llvm-exegesis/X86/analysis-unknown-opcode-did-you-mean.test
  • llvm-lit llvm/test/tools/llvm-exegesis/X86/analysis-skip-unknown-opcode.test

I only saw changes on one of these test files. Do you forget to git add the other one?

I didn't change analysis-skip-unknown-opcode.test, just regression testing.

@quanyeyang
quanyeyang requested a review from mshockwave June 13, 2026 04:28

@mshockwave mshockwave left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM w/ the AbsoluteDifference comment fixed

@mshockwave
mshockwave merged commit f77ca48 into llvm:main Jun 17, 2026
9 checks passed
@github-actions

Copy link
Copy Markdown

@quanyeyang Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

@llvm-ci

llvm-ci commented Jun 17, 2026

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-fuzzer running on sanitizer-buildbot11 while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/159/builds/49158

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[2/86] Building CXX object tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o
[3/86] Generating VCSVersion.inc
[4/84] Linking CXX shared module unittests/Analysis/InlineOrderPlugin.so
[5/84] Linking CXX shared module unittests/Passes/Plugins/DoublerPlugin.so
[6/84] Linking CXX shared module unittests/Support/DynamicLibrary/PipSqueak.so
[7/84] Linking CXX shared module unittests/Analysis/InlineAdvisorPlugin.so
[8/84] Linking CXX shared module unittests/Passes/Plugins/TestPlugin.so
[9/84] Linking CXX shared module unittests/Support/DynamicLibrary/SecondLib.so
[10/84] Linking CXX executable bin/llvm-config
[11/84] Building CXX object lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXAsmPrinter.cpp.o
FAILED: [code=1] lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXAsmPrinter.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/clang++ -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm_build0/lib/Target/NVPTX -I/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/lib/Target/NVPTX -I/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm_build0/include -I/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fvisibility=hidden -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXAsmPrinter.cpp.o -MF lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXAsmPrinter.cpp.o.d -o lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXAsmPrinter.cpp.o -c /home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:1693:40: error: too few arguments to function call, expected 3, have 2
 1693 |       AggBuffer->addSymbol(Cexpr, Cexpr);
      |       ~~~~~~~~~~~~~~~~~~~~             ^
/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h:150:10: note: 'addSymbol' declared here
  150 |     void addSymbol(const Value *GVar, const Value *GVarBeforeStripping,
      |          ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  151 |                    unsigned SymbolSize) {
      |                    ~~~~~~~~~~~~~~~~~~~
1 error generated.
[12/84] Building CXX object tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/BenchmarkResult.cpp.o
[13/84] Building CXX object lib/Transforms/Scalar/CMakeFiles/LLVMScalarOpts.dir/SimpleLoopUnswitch.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci

llvm-ci commented Jun 17, 2026

Copy link
Copy Markdown

LLVM Buildbot has detected a new failure on builder ml-opt-devrel-x86-64 running on ml-opt-devrel-x86-64-b1 while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/175/builds/40943

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
621.626 [464/64/3617] Building CXX object lib/Target/Mips/CMakeFiles/LLVMMipsCodeGen.dir/MipsFastISel.cpp.o
621.818 [463/64/3618] Building CXX object lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXLowerArgs.cpp.o
622.597 [462/64/3619] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCHazardRecognizers.cpp.o
622.897 [461/64/3620] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVConstantPoolValue.cpp.o
623.410 [460/64/3621] Building CXX object lib/Target/Mips/CMakeFiles/LLVMMipsCodeGen.dir/MipsSEISelLowering.cpp.o
623.459 [459/64/3622] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCBranchSelector.cpp.o
623.521 [458/64/3623] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCCTRLoops.cpp.o
624.370 [457/64/3624] Building CXX object lib/Target/LoongArch/CMakeFiles/LLVMLoongArchCodeGen.dir/LoongArchTargetMachine.cpp.o
624.569 [456/64/3625] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCCallingConv.cpp.o
624.615 [455/64/3626] Building CXX object lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXAsmPrinter.cpp.o
FAILED: lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXAsmPrinter.cpp.o 
ccache /usr/bin/c++ -DCPUINFO_SUPPORTED_PLATFORM=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/ml-opt-devrel-x86-64-b1/build/lib/Target/NVPTX -I/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Target/NVPTX -I/var/lib/buildbot/.local/lib/python3.7/site-packages/tensorflow/include -I/b/ml-opt-devrel-x86-64-b1/build/include -I/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/include -isystem /tmp/tflitebuild/tensorflow/include -isystem /tmp/tflitebuild/eigen/include/eigen3 -isystem /tmp/tflitebuild/abseil-cpp/include -isystem /tmp/tflitebuild/flatbuffers/include -isystem /tmp/tflitebuild/gemmlowp/include/gemmlowp -isystem /tmp/tflitebuild/ml_dtypes/src/ml_dtypes -isystem /tmp/tflitebuild/ml_dtypes/src/ml_dtypes/ml_dtypes -isystem /tmp/tflitebuild/ruy/include -isystem /tmp/tflitebuild/cpuinfo/include -isystem /tmp/tflitebuild/ARM_NEON_2_x86_SSE/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Xclang -fno-pch-timestamp -O3 -DNDEBUG -fvisibility=hidden -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -DEIGEN_NEON_GEBP_NR=4 -DTFL_STATIC_LIBRARY_BUILD -std=c++17 -Winvalid-pch -Xclang -include-pch -Xclang /b/ml-opt-devrel-x86-64-b1/build/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /b/ml-opt-devrel-x86-64-b1/build/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/cmake_pch.hxx -MD -MT lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXAsmPrinter.cpp.o -MF lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXAsmPrinter.cpp.o.d -o lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXAsmPrinter.cpp.o -c /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp:1693:40: error: too few arguments to function call, expected 3, have 2
 1693 |       AggBuffer->addSymbol(Cexpr, Cexpr);
      |       ~~~~~~~~~~~~~~~~~~~~             ^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h:150:10: note: 'addSymbol' declared here
  150 |     void addSymbol(const Value *GVar, const Value *GVarBeforeStripping,
      |          ^         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  151 |                    unsigned SymbolSize) {
      |                    ~~~~~~~~~~~~~~~~~~~
1 error generated.
624.681 [455/63/3627] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/GISel/PPCCallLowering.cpp.o
624.821 [455/62/3628] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/GISel/PPCRegisterBankInfo.cpp.o
624.824 [455/61/3629] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCPrepareIFuncsOnAIX.cpp.o
625.091 [455/60/3630] Building CXX object lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXDwarfDebug.cpp.o
625.214 [455/59/3631] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCMacroFusion.cpp.o
625.314 [455/58/3632] Building CXX object lib/Target/Lanai/CMakeFiles/LLVMLanaiCodeGen.dir/LanaiTargetMachine.cpp.o
625.392 [455/57/3633] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCTOCRegDeps.cpp.o
625.407 [455/56/3634] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCBoolRetToInt.cpp.o
625.485 [455/55/3635] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/GISel/PPCLegalizerInfo.cpp.o
625.570 [455/54/3636] Building CXX object lib/Target/BPF/CMakeFiles/LLVMBPFCodeGen.dir/BPFTargetMachine.cpp.o
625.772 [455/53/3637] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCMCInstLower.cpp.o
625.800 [455/52/3638] Building CXX object lib/Target/AMDGPU/CMakeFiles/LLVMAMDGPUCodeGen.dir/SIISelLowering.cpp.o
626.153 [455/51/3639] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCVSXWACCCopy.cpp.o
626.966 [455/50/3640] Building CXX object lib/Target/LoongArch/CMakeFiles/LLVMLoongArchCodeGen.dir/LoongArchTargetTransformInfo.cpp.o
627.381 [455/49/3641] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCLowerMASSVEntries.cpp.o
627.450 [455/48/3642] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCTLSDynamicCall.cpp.o
627.713 [455/47/3643] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCGenScalarMASSEntries.cpp.o
627.718 [455/46/3644] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCSubtarget.cpp.o
627.842 [455/45/3645] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCReduceCRLogicals.cpp.o
628.229 [455/44/3646] Building CXX object lib/Target/Mips/CMakeFiles/LLVMMipsCodeGen.dir/MipsInstructionSelector.cpp.o
628.819 [455/43/3647] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCVSXFMAMutate.cpp.o
629.125 [455/42/3648] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVDeadRegisterDefinitions.cpp.o
629.129 [455/41/3649] Building CXX object lib/Target/NVPTX/CMakeFiles/LLVMNVPTXCodeGen.dir/NVPTXISelDAGToDAG.cpp.o
629.348 [455/40/3650] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCRegisterInfo.cpp.o
629.474 [455/39/3651] Building CXX object lib/Target/PowerPC/CMakeFiles/LLVMPowerPCCodeGen.dir/PPCPreEmitPeephole.cpp.o
629.703 [455/38/3652] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVInsertReadWriteCSR.cpp.o
629.969 [455/37/3653] Building CXX object lib/Target/AArch64/CMakeFiles/LLVMAArch64CodeGen.dir/AArch64ISelLowering.cpp.o
630.002 [455/36/3654] Building CXX object lib/Target/RISCV/CMakeFiles/LLVMRISCVCodeGen.dir/RISCVExpandAtomicPseudoInsts.cpp.o

@quanyeyang
quanyeyang deleted the fix/issue-203199 branch June 18, 2026 02:23
nasherm pushed a commit to nasherm/llvm-project that referenced this pull request Jun 18, 2026
Fixes llvm#203199

When skipping a benchmark entry with an unknown opcode name, suggest the
nearest matching opcode if the edit distance is <= 1 (similar to
OptTable::findNearest).

Example:
```text
warning: skipping benchmark entry: No opcode with name 'VADDPDYrrr' - did you mean 'VADDPDYrr' ?
```

And Tested with:
- `llvm-lit
llvm/test/tools/llvm-exegesis/X86/analysis-unknown-opcode-did-you-mean.test`
- `llvm-lit
llvm/test/tools/llvm-exegesis/X86/analysis-skip-unknown-opcode.test`

---------

Signed-off-by: quanyeyang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[llvm-exegesis] Add "did you mean ?" style hint for unknown instruction opcodes

3 participants