xref: /llvm-project/llvm/test/Other/scc-pass-printer.ll (revision 9c1cdc23f82ba26c597554363e4e7aa45f3196ed)
1; RUN: opt < %s 2>&1 -disable-output \
2; RUN: 	   -passes=inline -print-after-all | FileCheck %s -check-prefix=INL
3; RUN: opt < %s 2>&1 -disable-output \
4; RUN: 	   -passes=inliner-wrapper -print-after-all | FileCheck %s -check-prefix=INL
5; RUN: opt < %s 2>&1 -disable-output \
6; RUN: 	   -passes=inline -print-after-all -print-module-scope | FileCheck %s -check-prefix=INL-MOD
7; RUN: opt < %s 2>&1 -disable-output \
8; RUN: 	   -passes=inliner-wrapper -print-after-all -print-module-scope | FileCheck %s -check-prefix=INL-MOD
9
10; INL:      IR Dump After InlinerPass on (foo, bar) ***
11; INL:      define void @foo()
12; INL-NEXT:   call void @bar()
13; INL:      define void @bar()
14; INL-NEXT:   call void @foo()
15; INL:      IR Dump After InlinerPass on (tester) ***
16; INL:      define void @tester()
17; INL-NEXT:   call void @foo()
18
19; INL-MOD-LABEL:*** IR Dump After InlinerPass on (foo, bar) ***
20; INL-MOD-NEXT: ModuleID =
21; INL-MOD-NEXT: source_filename =
22; INL-MOD: define void @tester()
23; INL-MOD-NEXT:  call void @foo()
24; INL-MOD: define void @foo()
25; INL-MOD-NEXT:  call void @bar()
26; INL-MOD: define void @bar()
27; INL-MOD-NEXT:   call void @foo()
28; INL-MOD-LABEL:*** IR Dump After InlinerPass on (tester) ***
29; INL-MOD-NEXT: ModuleID =
30; INL-MOD-NEXT: source_filename =
31; INL-MOD: define void @tester()
32; INL-MOD-NEXT:  call void @foo()
33; INL-MOD: define void @foo()
34; INL-MOD-NEXT:   call void @bar()
35; INL-MOD: define void @bar()
36; INL-MOD-NEXT:  call void @foo()
37; INL-MOD-NOT: Printing <null> Function
38
39define void @tester() noinline {
40  call void @foo()
41  ret void
42}
43
44define void @foo() noinline {
45  call void @bar()
46  ret void
47}
48
49define void @bar() noinline {
50  call void @foo()
51  ret void
52}
53