[llvm] b16cbd8 - [llvm-exegesis][X86] Ignore a few unmeasurable opcodes.

Clement Courbet via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 01:49:01 PST 2021


Author: Clement Courbet
Date: 2021-02-26T10:48:15+01:00
New Revision: b16cbd8890a08ea265b8d3f3499a29b58bfa3b4a

URL: https://github.com/llvm/llvm-project/commit/b16cbd8890a08ea265b8d3f3499a29b58bfa3b4a
DIFF: https://github.com/llvm/llvm-project/commit/b16cbd8890a08ea265b8d3f3499a29b58bfa3b4a.diff

LOG: [llvm-exegesis][X86] Ignore a few unmeasurable opcodes.

Differential Revision: https://reviews.llvm.org/D90744

Added: 
    

Modified: 
    llvm/tools/llvm-exegesis/lib/X86/Target.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
index 15fa54e2f6a2..96781dd807a8 100644
--- a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -196,6 +196,21 @@ static const char *isInvalidOpcode(const Instruction &Instr) {
   if (OpcodeName.startswith("POP") || OpcodeName.startswith("PUSH") ||
       OpcodeName.startswith("ADJCALLSTACK") || OpcodeName.startswith("LEAVE"))
     return "unsupported opcode: Push/Pop/AdjCallStack/Leave";
+  switch (Instr.Description.Opcode) {
+  case X86::LFS16rm:
+  case X86::LFS32rm:
+  case X86::LFS64rm:
+  case X86::LGS16rm:
+  case X86::LGS32rm:
+  case X86::LGS64rm:
+  case X86::LSS16rm:
+  case X86::LSS32rm:
+  case X86::LSS64rm:
+  case X86::SYSENTER:
+    return "unsupported opcode";
+  default:
+    break;
+  }
   if (const auto reason = isInvalidMemoryInstr(Instr))
     return reason;
   // We do not handle instructions with OPERAND_PCREL.


        


More information about the llvm-commits mailing list