[llvm] 3b2e904 - [NFC][Exegesis][X86] Test that we don't crash while coming up with snippets

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 08:32:51 PST 2023


Author: Roman Lebedev
Date: 2023-01-05T19:32:16+03:00
New Revision: 3b2e904ed5d5a3c239b1ec7c1635667469369b22

URL: https://github.com/llvm/llvm-project/commit/3b2e904ed5d5a3c239b1ec7c1635667469369b22
DIFF: https://github.com/llvm/llvm-project/commit/3b2e904ed5d5a3c239b1ec7c1635667469369b22.diff

LOG: [NFC][Exegesis][X86] Test that we don't crash while coming up with snippets

These tests take less than a second each,
so they are fine to have as tests.

It will be useful to add similar ones
for `prepare-and-assemble-snippet` x repetition mode,
but there we have a problem of not being truly ISA set independent...

Added: 
    llvm/test/tools/llvm-exegesis/X86/inverse_throughput/inverse_throughput-prepare-all-snippets-exhaustively.s
    llvm/test/tools/llvm-exegesis/X86/inverse_throughput/inverse_throughput-prepare-all-snippets.s
    llvm/test/tools/llvm-exegesis/X86/latency/latency-prepare-all-snippets-exhaustively.s
    llvm/test/tools/llvm-exegesis/X86/latency/latency-prepare-all-snippets.s
    llvm/test/tools/llvm-exegesis/X86/uops/uops-prepare-all-snippets-exhaustively.s
    llvm/test/tools/llvm-exegesis/X86/uops/uops-prepare-all-snippets.s

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-exegesis/X86/inverse_throughput/inverse_throughput-prepare-all-snippets-exhaustively.s b/llvm/test/tools/llvm-exegesis/X86/inverse_throughput/inverse_throughput-prepare-all-snippets-exhaustively.s
new file mode 100644
index 0000000000000..1e9c5c34115bb
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/inverse_throughput/inverse_throughput-prepare-all-snippets-exhaustively.s
@@ -0,0 +1,3 @@
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=inverse_throughput -opcode-index=-1 --max-configs-per-opcode=1048576 --benchmark-phase=prepare-snippet --benchmarks-file=-
+# FIXME: it would be good to check how many snippets we end up producing,
+# but the number is unstable, so for now just check that we do not crash.

diff  --git a/llvm/test/tools/llvm-exegesis/X86/inverse_throughput/inverse_throughput-prepare-all-snippets.s b/llvm/test/tools/llvm-exegesis/X86/inverse_throughput/inverse_throughput-prepare-all-snippets.s
new file mode 100644
index 0000000000000..538555ed809c0
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/inverse_throughput/inverse_throughput-prepare-all-snippets.s
@@ -0,0 +1,3 @@
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=inverse_throughput -opcode-index=-1 --max-configs-per-opcode=1 --benchmark-phase=prepare-snippet --benchmarks-file=-
+# FIXME: it would be good to check how many snippets we end up producing,
+# but the number is unstable, so for now just check that we do not crash.

diff  --git a/llvm/test/tools/llvm-exegesis/X86/latency/latency-prepare-all-snippets-exhaustively.s b/llvm/test/tools/llvm-exegesis/X86/latency/latency-prepare-all-snippets-exhaustively.s
new file mode 100644
index 0000000000000..e7c3d37a4c1f8
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/latency/latency-prepare-all-snippets-exhaustively.s
@@ -0,0 +1,3 @@
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency -opcode-index=-1 --max-configs-per-opcode=1048576 --benchmark-phase=prepare-snippet --benchmarks-file=-
+# FIXME: it would be good to check how many snippets we end up producing,
+# but the number is unstable, so for now just check that we do not crash.

diff  --git a/llvm/test/tools/llvm-exegesis/X86/latency/latency-prepare-all-snippets.s b/llvm/test/tools/llvm-exegesis/X86/latency/latency-prepare-all-snippets.s
new file mode 100644
index 0000000000000..e3ee21d8d27e6
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/latency/latency-prepare-all-snippets.s
@@ -0,0 +1,3 @@
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=latency -opcode-index=-1 --max-configs-per-opcode=1 --benchmark-phase=prepare-snippet --benchmarks-file=-
+# FIXME: it would be good to check how many snippets we end up producing,
+# but the number is unstable, so for now just check that we do not crash.

diff  --git a/llvm/test/tools/llvm-exegesis/X86/uops/uops-prepare-all-snippets-exhaustively.s b/llvm/test/tools/llvm-exegesis/X86/uops/uops-prepare-all-snippets-exhaustively.s
new file mode 100644
index 0000000000000..eeecd2e8196f4
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/uops/uops-prepare-all-snippets-exhaustively.s
@@ -0,0 +1,3 @@
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=uops -opcode-index=-1 --max-configs-per-opcode=1048576 --benchmark-phase=prepare-snippet --benchmarks-file=-
+# FIXME: it would be good to check how many snippets we end up producing,
+# but the number is unstable, so for now just check that we do not crash.

diff  --git a/llvm/test/tools/llvm-exegesis/X86/uops/uops-prepare-all-snippets.s b/llvm/test/tools/llvm-exegesis/X86/uops/uops-prepare-all-snippets.s
new file mode 100644
index 0000000000000..d0a54e2476b16
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/uops/uops-prepare-all-snippets.s
@@ -0,0 +1,3 @@
+# RUN: llvm-exegesis -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mode=uops -opcode-index=-1 --max-configs-per-opcode=1 --benchmark-phase=prepare-snippet --benchmarks-file=-
+# FIXME: it would be good to check how many snippets we end up producing,
+# but the number is unstable, so for now just check that we do not crash.


        


More information about the llvm-commits mailing list