summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/CMakeLists.txt1
-rw-r--r--llvm/test/lit.cfg.py21
-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
6 files changed, 33 insertions, 10 deletions
diff --git a/llvm/test/CMakeLists.txt b/llvm/test/CMakeLists.txt
index 32f1e2ec17f..1d8047dada5 100644
--- a/llvm/test/CMakeLists.txt
+++ b/llvm/test/CMakeLists.txt
@@ -60,6 +60,7 @@ set(LLVM_TEST_DEPENDS
dsymutil
llvm-dwarfdump
llvm-dwp
+ llvm-exegesis
llvm-extract
llvm-isel-fuzzer
llvm-lib
diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index f6080df7485..9099221c80c 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -140,16 +140,17 @@ tools = [
# FIXME: Why do we have both `lli` and `%lli` that do slightly different things?
tools.extend([
- 'dsymutil', 'lli', 'lli-child-target', 'llvm-ar', 'llvm-as', 'llvm-bcanalyzer',
- 'llvm-config', 'llvm-cov', 'llvm-cxxdump', 'llvm-cvtres', 'llvm-diff', 'llvm-dis',
- 'llvm-dwarfdump', 'llvm-extract', 'llvm-isel-fuzzer', 'llvm-opt-fuzzer', 'llvm-lib',
- 'llvm-link', 'llvm-lto', 'llvm-lto2', 'llvm-mc', 'llvm-mca',
- 'llvm-modextract', 'llvm-nm', 'llvm-objcopy', 'llvm-objdump',
- 'llvm-pdbutil', 'llvm-profdata', 'llvm-ranlib', 'llvm-readobj',
- 'llvm-rtdyld', 'llvm-size', 'llvm-split', 'llvm-strings', 'llvm-strip', 'llvm-tblgen',
- 'llvm-undname', 'llvm-c-test', 'llvm-cxxfilt', 'llvm-xray', 'yaml2obj', 'obj2yaml',
- 'yaml-bench', 'verify-uselistorder',
- 'bugpoint', 'llc', 'llvm-symbolizer', 'opt', 'sancov', 'sanstats'])
+ 'dsymutil', 'lli', 'lli-child-target', 'llvm-ar', 'llvm-as',
+ 'llvm-bcanalyzer', 'llvm-config', 'llvm-cov', 'llvm-cxxdump', 'llvm-cvtres',
+ 'llvm-diff', 'llvm-dis', 'llvm-dwarfdump', 'llvm-exegesis', 'llvm-extract',
+ 'llvm-isel-fuzzer', 'llvm-opt-fuzzer', 'llvm-lib', 'llvm-link', 'llvm-lto',
+ 'llvm-lto2', 'llvm-mc', 'llvm-mca', 'llvm-modextract', 'llvm-nm',
+ 'llvm-objcopy', 'llvm-objdump', 'llvm-pdbutil', 'llvm-profdata',
+ 'llvm-ranlib', 'llvm-readobj', 'llvm-rtdyld', 'llvm-size', 'llvm-split',
+ 'llvm-strings', 'llvm-strip', 'llvm-tblgen', 'llvm-undname', 'llvm-c-test',
+ 'llvm-cxxfilt', 'llvm-xray', 'yaml2obj', 'obj2yaml', 'yaml-bench',
+ 'verify-uselistorder', 'bugpoint', 'llc', 'llvm-symbolizer', 'opt',
+ 'sancov', 'sanstats'])
# The following tools are optional
tools.extend([
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