aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-11-06 14:11:58 +0000
committerClement Courbet <courbet@google.com>2018-11-06 14:11:58 +0000
commit003e08ff28c2db383f1791f5cc62c8aa61312ed1 (patch)
tree18f58f5782cc310679cc14e7bb8f5ab60f4d8095
parent54a1184fff9f9b1ec6b4d0087939cc1aa9837b43 (diff)
downloadllvm-003e08ff28c2db383f1791f5cc62c8aa61312ed1.zip
llvm-003e08ff28c2db383f1791f5cc62c8aa61312ed1.tar.gz
llvm-003e08ff28c2db383f1791f5cc62c8aa61312ed1.tar.bz2
[llvm-exegesis] Ignore X86 pseudo instructions.
Summary: They do not lower to actual MCInsts and have no scheduling info. Reviewers: gchatelet Subscribers: llvm-commits, tschuett Differential Revision: https://reviews.llvm.org/D54147 llvm-svn: 346227
-rw-r--r--llvm/tools/llvm-exegesis/lib/X86/Target.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
index 6ae228e..b74d5dc 100644
--- a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -75,6 +75,9 @@ getMemoryOperandRanges(llvm::ArrayRef<Operand> Operands) {
static llvm::Error IsInvalidOpcode(const Instruction &Instr) {
const auto OpcodeName = Instr.Name;
+ if ((Instr.Description->TSFlags & X86II::FormMask) == X86II::Pseudo)
+ return llvm::make_error<BenchmarkFailure>(
+ "unsupported opcode: pseudo instruction");
if (OpcodeName.startswith("POPF") || OpcodeName.startswith("PUSHF") ||
OpcodeName.startswith("ADJCALLSTACK"))
return llvm::make_error<BenchmarkFailure>(