mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[llvm-exegesis] Don't erroneously refuse to measure POPCNT instruction
This commit is contained in:
parent
2e53058780
commit
01ca731f88
7
test/tools/llvm-exegesis/X86/uops-POPCNT32rr.s
Normal file
7
test/tools/llvm-exegesis/X86/uops-POPCNT32rr.s
Normal file
@ -0,0 +1,7 @@
|
||||
# RUN: llvm-exegesis -mode=uops -opcode-name=POPCNT32rr 2>&1 | FileCheck %s
|
||||
|
||||
CHECK: ---
|
||||
CHECK-NEXT: mode: uops
|
||||
CHECK-NEXT: key:
|
||||
CHECK-NEXT: instructions:
|
||||
CHECK-NEXT: - 'POPCNT32rr
|
@ -194,8 +194,9 @@ static const char *isInvalidOpcode(const Instruction &Instr) {
|
||||
const auto OpcodeName = Instr.Name;
|
||||
if ((Instr.Description.TSFlags & X86II::FormMask) == X86II::Pseudo)
|
||||
return "unsupported opcode: pseudo instruction";
|
||||
if (OpcodeName.startswith("POP") || OpcodeName.startswith("PUSH") ||
|
||||
OpcodeName.startswith("ADJCALLSTACK") || OpcodeName.startswith("LEAVE"))
|
||||
if ((OpcodeName.startswith("POP") && !OpcodeName.startswith("POPCNT")) ||
|
||||
OpcodeName.startswith("PUSH") || OpcodeName.startswith("ADJCALLSTACK") ||
|
||||
OpcodeName.startswith("LEAVE"))
|
||||
return "unsupported opcode: Push/Pop/AdjCallStack/Leave";
|
||||
switch (Instr.Description.Opcode) {
|
||||
case X86::LFS16rm:
|
||||
|
Loading…
x
Reference in New Issue
Block a user