1# RUN: llvm-exegesis -mode=uops -opcode-name=CMOV16rm  -benchmarks-file=%t.CMOV16rm-uops.yaml
2# RUN: FileCheck -check-prefixes=CHECK-YAML -input-file=%t.CMOV16rm-uops.yaml %s
3# RUN: llvm-exegesis -mcpu=bdver2 -mode=analysis -benchmarks-file=%t.CMOV16rm-uops.yaml -analysis-clusters-output-file=- -analysis-clustering-epsilon=0.1 -analysis-inconsistency-epsilon=0.1 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-CLUSTERS %s
4
5# https://bugs.llvm.org/show_bug.cgi?id=41448
6# 1. Verify that we correctly serialize RegNo 0 as %noreg, not as an empty string!
7# 2. Verify that deserialization works. Since CMOV16rm has a variant sched class, just printing clusters is sufficient
8
9CHECK-YAML:      ---
10CHECK-YAML-NEXT: mode:            uops
11CHECK-YAML-NEXT: key:
12CHECK-YAML-NEXT:   instructions:
13CHECK-YAML-NEXT:     - 'CMOV16rm {{[A-Z0-9]+}} {{[A-Z0-9]+}} {{[A-Z0-9]+}} i_0x1 %noreg i_0x0 %noreg i_0x{{[0-9a-f]}}'
14CHECK-YAML-LAST: ...
15
16# CHECK-CLUSTERS: {{^}}cluster_id,opcode_name,config,sched_class,
17# CHECK-CLUSTERS-NEXT: {{^}}0,
18