summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-isel-fuzzer
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/tools/llvm-isel-fuzzer')
-rw-r--r--llvm/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll15
-rw-r--r--llvm/test/tools/llvm-isel-fuzzer/execname-options.ll15
2 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll b/llvm/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll
new file mode 100644
index 00000000000..baf4b0f87a6
--- /dev/null
+++ b/llvm/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll
@@ -0,0 +1,15 @@
+; REQUIRES: aarch64-registered-target
+
+; RUN: echo > %t.input
+
+; RUN: cp llvm-isel-fuzzer %t.bin=aarch64
+; RUN: %t.bin=aarch64 %t.input 2>&1 | FileCheck -check-prefix=AARCH64 %s
+; AARCH64: Injected args: -mtriple=aarch64
+
+; RUN: cp llvm-isel-fuzzer %t.bin=aarch64-O1
+; RUN: %t.bin=aarch64-O1 %t.input 2>&1 | FileCheck -check-prefix=OPT-AFTER %s
+; OPT-AFTER: Injected args: -mtriple=aarch64 -O1
+
+; RUN: cp llvm-isel-fuzzer %t.bin=O3-aarch64
+; RUN: %t.bin=O3-aarch64 %t.input 2>&1 | FileCheck -check-prefix=OPT-BEFORE %s
+; OPT-BEFORE: Injected args: -O3 -mtriple=aarch64
diff --git a/llvm/test/tools/llvm-isel-fuzzer/execname-options.ll b/llvm/test/tools/llvm-isel-fuzzer/execname-options.ll
new file mode 100644
index 00000000000..61fbab3897e
--- /dev/null
+++ b/llvm/test/tools/llvm-isel-fuzzer/execname-options.ll
@@ -0,0 +1,15 @@
+; RUN: echo > %t.input
+
+; RUN: cp llvm-isel-fuzzer %t.bin=gisel
+; RUN: not %t.bin=gisel %t.input 2>&1 | FileCheck -check-prefix=GISEL %s
+; GISEL: Injected args: -global-isel -O0
+; GISEL: -mtriple must be specified
+
+; RUN: cp llvm-isel-fuzzer %t.bin=gisel-O2
+; RUN: not %t.bin=gisel-O2 %t.input 2>&1 | FileCheck -check-prefix=GISEL-O2 %s
+; GISEL-O2: Injected args: -global-isel -O0 -O2
+; GISEL-O2: -mtriple must be specified
+
+; RUN: cp llvm-isel-fuzzer %t.bin=unexist
+; RUN: not %t.bin=unexist %t.input 2>&1 | FileCheck -check-prefix=NO-OPT %s
+; NO-OPT: Unknown option:
OpenPOWER on IntegriCloud