summaryrefslogtreecommitdiff
path: root/test/Other
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-05-16 08:32:49 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-05-16 08:32:49 +0000
commit8bc3434e68028263c42dd26bde3c16450cb146f4 (patch)
tree5c216ef9b65b1c32c440350e1ebae19c8230f737 /test/Other
parent04b2c5042727b091ad425110d952491a40c88ee3 (diff)
downloadllvm-8bc3434e68028263c42dd26bde3c16450cb146f4.tar.gz
llvm-8bc3434e68028263c42dd26bde3c16450cb146f4.tar.bz2
llvm-8bc3434e68028263c42dd26bde3c16450cb146f4.tar.xz
Teach the 'opt' tool about '-Os' and '-Oz', corresponding to the Clang
options, to enable easier testing of the innards of LLVM that are enabled by such optimization strategies. Note that this doesn't provide the (much needed) function attribute support for -Oz (as opposed to -Os), but still seems like a positive step to better test the logic that Clang currently relies on. Patch by Patrik Hägglund. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/optimize-options.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Other/optimize-options.ll b/test/Other/optimize-options.ll
new file mode 100644
index 0000000000..5b1fe52ac1
--- /dev/null
+++ b/test/Other/optimize-options.ll
@@ -0,0 +1,8 @@
+;RUN: opt -S -O1 -debug-pass=Arguments |& FileCheck %s
+;RUN: opt -S -O2 -debug-pass=Arguments |& FileCheck %s
+;RUN: opt -S -Os -debug-pass=Arguments |& FileCheck %s
+;RUN: opt -S -Oz -debug-pass=Arguments |& FileCheck %s
+;RUN: opt -S -O3 -debug-pass=Arguments |& FileCheck %s
+
+; Just check that we get a non-empty set of passes for each -O opton.
+;CHECK: Pass Arguments: {{.*}} -print-module