summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-exegesis
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-09-25 09:27:43 +0000
committerClement Courbet <courbet@google.com>2018-09-25 09:27:43 +0000
commit7f1322dc4d270a74f96e5d6c7fd6fe25df71e1e6 (patch)
tree6031ffbcfda2abb34b7f38e407613a914745a9a6 /llvm/test/tools/llvm-exegesis
parent764f349d95fab320c7bcc6b52ce4e54f9c5a5ab7 (diff)
downloadbcm5719-llvm-7f1322dc4d270a74f96e5d6c7fd6fe25df71e1e6.tar.gz
bcm5719-llvm-7f1322dc4d270a74f96e5d6c7fd6fe25df71e1e6.zip
[llvm-exegesis] Add lit tests.
Summary: Right now we only have unit tests. This will allow testing the whole tool. Even though We can't really check actual values, this will avoid regressions such as PR39055. Reviewers: gchatelet, alexshap Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D52407 llvm-svn: 342953
Diffstat (limited to 'llvm/test/tools/llvm-exegesis')
-rw-r--r--llvm/test/tools/llvm-exegesis/X86/latency-by-opcode-name.s6
-rw-r--r--llvm/test/tools/llvm-exegesis/X86/lit.local.cfg7
-rw-r--r--llvm/test/tools/llvm-exegesis/X86/uops-by-opcode-name.s6
-rw-r--r--llvm/test/tools/llvm-exegesis/lit.local.cfg2
4 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-exegesis/X86/latency-by-opcode-name.s b/llvm/test/tools/llvm-exegesis/X86/latency-by-opcode-name.s
new file mode 100644
index 00000000000..5c6889f0ab6
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/latency-by-opcode-name.s
@@ -0,0 +1,6 @@
+# RUN: llvm-exegesis -mode=latency -opcode-name=ADD32rr | FileCheck %s
+
+CHECK: mode: latency
+CHECK-NEXT: key:
+CHECK-NEXT: instructions:
+CHECK-NEXT: ADD32rr
diff --git a/llvm/test/tools/llvm-exegesis/X86/lit.local.cfg b/llvm/test/tools/llvm-exegesis/X86/lit.local.cfg
new file mode 100644
index 00000000000..1d6936cf26b
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/lit.local.cfg
@@ -0,0 +1,7 @@
+# We need support for X86.
+if not ('X86' in config.root.targets):
+ config.unsupported = True
+
+# And we need to be running on an X86 host.
+if not ('x86_64' in config.root.host_triple):
+ config.unsupported = True
diff --git a/llvm/test/tools/llvm-exegesis/X86/uops-by-opcode-name.s b/llvm/test/tools/llvm-exegesis/X86/uops-by-opcode-name.s
new file mode 100644
index 00000000000..982bd4fdf40
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/uops-by-opcode-name.s
@@ -0,0 +1,6 @@
+# RUN: llvm-exegesis -mode=uops -opcode-name=ADD32rr | FileCheck %s
+
+CHECK: mode: uops
+CHECK-NEXT: key:
+CHECK-NEXT: instructions:
+CHECK-NEXT: ADD32rr
diff --git a/llvm/test/tools/llvm-exegesis/lit.local.cfg b/llvm/test/tools/llvm-exegesis/lit.local.cfg
new file mode 100644
index 00000000000..b2fc1412af2
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/lit.local.cfg
@@ -0,0 +1,2 @@
+if 'native' not in config.available_features:
+ config.unsupported = True
OpenPOWER on IntegriCloud