forked from OSchip/llvm-project
[llvm-exegesis] Don't erroneously refuse to measure POPCNT instruction
This commit is contained in:
parent
6fbbb093ae
commit
64a52e1e32
|
@ -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…
Reference in New Issue