llvm-project
52 строки · 2.8 Кб
1; RUN: opt < %s -disable-output -passes='no-op-module' -print-before=bleh 2>&1 | FileCheck %s --check-prefix=NONE --allow-empty
2; RUN: opt < %s -disable-output -passes='no-op-module' -print-after=bleh 2>&1 | FileCheck %s --check-prefix=NONE --allow-empty
3; RUN: opt < %s -disable-output -passes='no-op-module' -print-before=no-op-function 2>&1 | FileCheck %s --check-prefix=NONE --allow-empty
4; RUN: opt < %s -disable-output -passes='no-op-module' -print-after=no-op-function 2>&1 | FileCheck %s --check-prefix=NONE --allow-empty
5; RUN: opt < %s -disable-output -passes='no-op-module,no-op-function' -print-before=no-op-module 2>&1 | FileCheck %s --check-prefix=ONCE
6; RUN: opt < %s -disable-output -passes='no-op-module,no-op-function' -print-after=no-op-module 2>&1 | FileCheck %s --check-prefix=ONCE
7; RUN: opt < %s -disable-output -passes='no-op-function' -print-before=no-op-function 2>&1 | FileCheck %s --check-prefix=ONCE
8; RUN: opt < %s -disable-output -passes='no-op-function' -print-after=no-op-function 2>&1 | FileCheck %s --check-prefix=ONCE
9; RUN: opt < %s -disable-output -passes='no-op-module,no-op-function' -print-before=no-op-function --print-module-scope 2>&1 | FileCheck %s --check-prefix=TWICE
10; RUN: opt < %s -disable-output -passes='no-op-module,no-op-function' -print-after=no-op-function --print-module-scope 2>&1 | FileCheck %s --check-prefix=TWICE
11; RUN: opt < %s -disable-output -passes='loop-vectorize' -print-before=loop-vectorize -print-after=loop-vectorize 2>&1 | FileCheck %s --check-prefix=CHECK-LV --allow-empty
12; RUN: opt < %s -disable-output -passes='simple-loop-unswitch,simple-loop-unswitch<nontrivial>,simple-loop-unswitch<no-nontrivial>' -print-before=simple-loop-unswitch -print-after=simple-loop-unswitch 2>&1 | FileCheck %s --check-prefix=CHECK-UNSWITCH --allow-empty
13
14; NONE-NOT: @foo
15; NONE-NOT: @bar
16
17; ONCE: @foo
18; ONCE: @bar
19; ONCE-NOT: @foo
20; ONCE-NOT: @bar
21
22; TWICE: @foo
23; TWICE: @bar
24; TWICE: @foo
25; TWICE: @bar
26; TWICE-NOT: @foo
27; TWICE-NOT: @bar
28
29; Verify that we can handle function passes with params.
30; CHECK-LV: *** IR Dump Before LoopVectorizePass on foo ***
31; CHECK-LV: *** IR Dump After LoopVectorizePass on foo ***
32; CHECK-LV: *** IR Dump Before LoopVectorizePass on bar ***
33; CHECK-LV: *** IR Dump After LoopVectorizePass on bar ***
34
35; Verify that we can handle loop passes with params.
36; CHECK-UNSWITCH: *** IR Dump Before SimpleLoopUnswitchPass on loop
37; CHECK-UNSWITCH: *** IR Dump After SimpleLoopUnswitchPass on loop
38; CHECK-UNSWITCH: *** IR Dump Before SimpleLoopUnswitchPass on loop
39; CHECK-UNSWITCH: *** IR Dump After SimpleLoopUnswitchPass on loop
40; CHECK-UNSWITCH: *** IR Dump Before SimpleLoopUnswitchPass on loop
41; CHECK-UNSWITCH: *** IR Dump After SimpleLoopUnswitchPass on loop
42
43define void @foo() {
44ret void
45}
46
47define void @bar() {
48entry:
49br label %loop
50loop:
51br label %loop
52}
53