Fix x86 exegesis tests after c042aff8860df3cad2b274bf0a495e83ae36ddee
authorDavid Zarzycki <dave@znu.io>
Sun, 24 Jan 2021 13:50:37 +0000 (08:50 -0500)
committerDavid Zarzycki <dave@znu.io>
Sun, 24 Jan 2021 13:51:06 +0000 (08:51 -0500)
In c042aff8860df3cad2b274bf0a495e83ae36ddee, unused FileCheck prefixes became an error, which exposed some testing bugs in four exegesis tests. I've tried my best to either fix the testing bugs, or expand the testing to cover more scenarios.

Reviewed By: lebedev.ri

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

llvm/test/tools/llvm-exegesis/X86/analysis-cluster-stabilization.test
llvm/test/tools/llvm-exegesis/X86/analysis-clustering-algorithms.test
llvm/test/tools/llvm-exegesis/X86/analysis-naive-cluster-stabilization.test
llvm/test/tools/llvm-exegesis/X86/analysis-naive-clusterization.test

index 1579993..8f6981e 100644 (file)
@@ -1,6 +1,6 @@
 # RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-clusters-output-file=- -analysis-clustering-epsilon=0.1 -analysis-inconsistency-epsilon=0.1 -analysis-numpoints=1 | FileCheck -check-prefixes=CHECK-CLUSTERS %s
-# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-numpoints=1 | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-ALL,CHECK-INCONSISTENCIES-STABLE %s
-# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-display-unstable-clusters -analysis-numpoints=1 | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-ALL,CHECK-INCONSISTENCIES-UNSTABLE %s
+# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-numpoints=1 | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-STABLE %s
+# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-display-unstable-clusters -analysis-numpoints=1 | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-UNSTABLE %s
 
 # We have one ADD32rr measurement, and two measurements for SQRTSSr.
 # The ADD32rr measurement and one of the SQRTSSr measurements are identical,
index 00cb105..e56a914 100644 (file)
 
 # And -analysis-clustering=naive every opcode goes into separate cluster.
 
-# CHECK-CLUSTERS-NAIVE-049-NEXT: {{^}}0,
-# CHECK-CLUSTERS-NAIVE-049-SAME: ,1.50{{$}}
-# CHECK-CLUSTERS-NAIVE-049: {{^}}1,
-# CHECK-CLUSTERS-NAIVE-049-SAME: ,2.00{{$}}
-# CHECK-CLUSTERS-NAIVE-049: {{^}}2,
-# CHECK-CLUSTERS-NAIVE-049-SAME: ,2.50{{$}}
-# CHECK-CLUSTERS-NAIVE-049: {{^}}3,
-# CHECK-CLUSTERS-NAIVE-049-SAME: ,1.00{{$}}
+# CHECK-CLUSTERS-NAIVE-NEXT: {{^}}0,
+# CHECK-CLUSTERS-NAIVE-SAME: ,1.50{{$}}
+# CHECK-CLUSTERS-NAIVE: {{^}}1,
+# CHECK-CLUSTERS-NAIVE-SAME: ,2.00{{$}}
+# CHECK-CLUSTERS-NAIVE: {{^}}2,
+# CHECK-CLUSTERS-NAIVE-SAME: ,2.50{{$}}
+# CHECK-CLUSTERS-NAIVE: {{^}}3,
+# CHECK-CLUSTERS-NAIVE-SAME: ,1.00{{$}}
 
 # The "value" is manually specified, not measured.
 
index 0ac9bbd..1d0b892 100644 (file)
@@ -1,17 +1,17 @@
-# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-clusters-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-CLUSTERS-ALL,CHECK-CLUSTERS-05 %s
+# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-clusters-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-CLUSTERS-ALL %s
 # RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-STABLE-05 %s
 # RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-display-unstable-clusters -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-UNSTABLE-05 %s
 
-# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-clusters-output-file=- -analysis-clustering-epsilon=0.49 -analysis-inconsistency-epsilon=0.5 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-CLUSTERS-ALL,CHECK-CLUSTERS-049 %s
+# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-clusters-output-file=- -analysis-clustering-epsilon=0.49 -analysis-inconsistency-epsilon=0.5 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-CLUSTERS-ALL %s
 # RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.49 -analysis-inconsistency-epsilon=0.5 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-STABLE-049 %s
 # RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.49 -analysis-inconsistency-epsilon=0.5 -analysis-display-unstable-clusters -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-UNSTABLE-049 %s
 
 # CHECK-CLUSTERS-ALL: {{^}}cluster_id,opcode_name,config,sched_class,latency{{$}}
 
-# CHECK-CLUSTERS-NEXT-05: {{^}}0,
-# CHECK-CLUSTERS-SAME-05: ,90.00{{$}}
-# CHECK-CLUSTERS-05: {{^}}0,
-# CHECK-CLUSTERS-SAME-05: ,90.50{{$}}
+# CHECK-CLUSTERS-ALL-NEXT: {{^}}0,
+# CHECK-CLUSTERS-ALL-SAME: ,90.00{{$}}
+# CHECK-CLUSTERS-ALL: {{^}}0,
+# CHECK-CLUSTERS-ALL-SAME: ,90.50{{$}}
 
 # CHECK-INCONSISTENCIES-STABLE-05: ADD32rr
 # CHECK-INCONSISTENCIES-STABLE-05: ADD32rr
index 9f557a5..cfb7b10 100644 (file)
@@ -1,6 +1,6 @@
 # RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -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
-# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-ALL,CHECK-INCONSISTENCIES-STABLE %s
-# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-display-unstable-clusters -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-ALL,CHECK-INCONSISTENCIES-UNSTABLE %s
+# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-STABLE %s
+# RUN: llvm-exegesis -mode=analysis -benchmarks-file=%s -analysis-inconsistencies-output-file=- -analysis-clustering-epsilon=0.5 -analysis-inconsistency-epsilon=0.5 -analysis-display-unstable-clusters -analysis-numpoints=1 -analysis-clustering=naive | FileCheck -check-prefixes=CHECK-INCONSISTENCIES-UNSTABLE %s
 
 # We have two ADD32rr measurements, and two measurements for SQRTSSr.
 # ADD32rr measurements are neighbours.