summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/machine-outliner-flags.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/AArch64/machine-outliner-flags.ll')
-rw-r--r--llvm/test/CodeGen/AArch64/machine-outliner-flags.ll30
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/machine-outliner-flags.ll b/llvm/test/CodeGen/AArch64/machine-outliner-flags.ll
new file mode 100644
index 00000000000..0f232c8a1f0
--- /dev/null
+++ b/llvm/test/CodeGen/AArch64/machine-outliner-flags.ll
@@ -0,0 +1,30 @@
+; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
+; RUN: -enable-machine-outliner=always -mtriple arm64---- -o /dev/null 2>&1 \
+; RUN: | FileCheck %s -check-prefix=ALWAYS
+
+; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
+; RUN: -enable-machine-outliner -mtriple arm64---- -o /dev/null 2>&1 \
+; RUN: | FileCheck %s -check-prefix=ENABLE
+
+; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
+; RUN: -enable-machine-outliner=never -mtriple arm64---- -o /dev/null 2>&1 \
+; RUN: | FileCheck %s -check-prefix=NEVER
+
+; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
+; RUN: -mtriple arm64---- -o /dev/null 2>&1 \
+; RUN: | FileCheck %s -check-prefix=NOT-ADDED
+
+; Make sure that the outliner flags all work properly. If we specify
+; -enable-machine-outliner with always or no argument, it should be added to the
+; pass pipeline. If we specify it with never, or don't pass the flag,
+; then we shouldn't add it.
+
+; ALWAYS: Machine Outliner
+; ENABLE: Machine Outliner
+; NEVER-NOT: Machine Outliner
+; NOT-ADDED-NOT: Machine Outliner
+
+define void @foo() {
+ ret void;
+}
+
OpenPOWER on IntegriCloud