[llvm-exegesis][X86] Explicitly not support `WRFSBASE` opcode.
authorRoman Lebedev <lebedev.ri@gmail.com>
Sun, 18 Dec 2022 16:43:31 +0000 (19:43 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sun, 18 Dec 2022 17:07:02 +0000 (20:07 +0300)
We can't serialize if for latency measurements, and when measuring uops,
it crashes so hard even `CrashRecoveryContext` doesn't stop it.

Looks like *this* was the last crasher, now `--opcode-index=-1`
succeeds for all three benchmark modes here.
At least with Duplication repetitor.

llvm/test/tools/llvm-exegesis/X86/latency/latency-WRFSBASE.s [new file with mode: 0644]
llvm/tools/llvm-exegesis/lib/X86/Target.cpp

diff --git a/llvm/test/tools/llvm-exegesis/X86/latency/latency-WRFSBASE.s b/llvm/test/tools/llvm-exegesis/X86/latency/latency-WRFSBASE.s
new file mode 100644 (file)
index 0000000..7420067
--- /dev/null
@@ -0,0 +1,6 @@
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --skip-measurements -opcode-name=WRFSBASE -repetition-mode=duplicate 2>&1 | FileCheck %s
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --skip-measurements -opcode-name=WRFSBASE -repetition-mode=loop 2>&1 | FileCheck %s
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --skip-measurements -opcode-name=WRFSBASE64 -repetition-mode=duplicate 2>&1 | FileCheck %s
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency --skip-measurements -opcode-name=WRFSBASE64 -repetition-mode=loop 2>&1 | FileCheck %s
+
+CHECK: WRFSBASE{{(64)?}}: unsupported opcode
index 3770431..2fda99c 100644 (file)
@@ -217,6 +217,8 @@ static const char *isInvalidOpcode(const Instruction &Instr) {
   case X86::LSS32rm:
   case X86::LSS64rm:
   case X86::SYSENTER:
+  case X86::WRFSBASE:
+  case X86::WRFSBASE64:
     return "unsupported opcode";
   default:
     break;