xref: /llvm-project/llvm/test/Other/opt-On.ll (revision c1b4240322bfaa43b7f02ca58cf9fe52744884b9)
1; RUN: not opt -O1 -O2 < %s 2>&1 | FileCheck %s --check-prefix=MULTIPLE
2; RUN: not opt -O1 -passes='no-op-module' < %s 2>&1 | FileCheck %s --check-prefix=BOTH
3; RUN: not opt -O1 -passes=gvn < %s 2>&1 | FileCheck %s --check-prefix=BOTH
4; RUN: opt -O0 < %s -S 2>&1 | FileCheck %s --check-prefix=OPT
5; RUN: opt -O1 < %s -S 2>&1 | FileCheck %s --check-prefix=OPT
6; RUN: opt -O2 < %s -S 2>&1 | FileCheck %s --check-prefix=OPT
7; RUN: opt -O3 < %s -S 2>&1 | FileCheck %s --check-prefix=OPT
8; RUN: opt -Os < %s -S 2>&1 | FileCheck %s --check-prefix=OPT
9; RUN: opt -Oz < %s -S 2>&1 | FileCheck %s --check-prefix=OPT
10; RUN: opt -O2 -debug-pass-manager -disable-output < %s 2>&1 | FileCheck %s --check-prefix=AA
11
12; MULTIPLE: Cannot specify multiple -O#
13; BOTH: Cannot specify -O# and --passes=
14; OPT: define void @f
15; Make sure we run the default AA pipeline with `opt -O#`
16; AA: Running analysis: ScopedNoAliasAA
17
18define void @f() {
19  unreachable
20}
21
22