1 ; RUN: opt -enable-new-pm=0 < %s 2>&1 -disable-output \
2 ; RUN: -inline -print-after-all | FileCheck %s --check-prefix=LEGACY
3 ; RUN: opt < %s 2>&1 -disable-output \
4 ; RUN: -passes=inline -print-after-all | FileCheck %s -check-prefix=INL
5 ; RUN: opt < %s 2>&1 -disable-output \
6 ; RUN: -passes=inliner-wrapper -print-after-all | FileCheck %s -check-prefix=INL
7 ; RUN: opt -enable-new-pm=0 < %s 2>&1 -disable-output \
8 ; RUN: -inline -print-after-all -print-module-scope | FileCheck %s -check-prefix=LEGACY-MOD
9 ; RUN: opt < %s 2>&1 -disable-output \
10 ; RUN: -passes=inline -print-after-all -print-module-scope | FileCheck %s -check-prefix=INL-MOD
11 ; RUN: opt < %s 2>&1 -disable-output \
12 ; RUN: -passes=inliner-wrapper -print-after-all -print-module-scope | FileCheck %s -check-prefix=INL-MOD
14 ; LEGACY: IR Dump After Function Integration/Inlining
15 ; LEGACY: define void @bar()
16 ; LEGACY-NEXT: call void @foo()
17 ; LEGACY: define void @foo()
18 ; LEGACY-NEXT: call void @bar()
19 ; LEGACY: IR Dump After Function Integration/Inlining
20 ; LEGACY: define void @tester()
21 ; LEGACY-NEXT: call void @foo()
23 ; INL: IR Dump After InlinerPass on (foo, bar) ***
24 ; INL: define void @foo()
25 ; INL-NEXT: call void @bar()
26 ; INL: define void @bar()
27 ; INL-NEXT: call void @foo()
28 ; INL: IR Dump After InlinerPass on (tester) ***
29 ; INL: define void @tester()
30 ; INL-NEXT: call void @foo()
32 ; LEGACY-MOD: IR Dump After Function Integration/Inlining
33 ; LEGACY-MOD-NEXT: ModuleID =
34 ; LEGACY-MOD: define void @tester()
35 ; LEGACY-MOD: define void @foo()
36 ; LEGACY-MOD: define void @bar()
38 ; INL-MOD-LABEL:*** IR Dump After InlinerPass on (foo, bar) ***
39 ; INL-MOD-NEXT: ModuleID =
40 ; INL-MOD-NEXT: source_filename =
41 ; INL-MOD: define void @tester()
42 ; INL-MOD-NEXT: call void @foo()
43 ; INL-MOD: define void @foo()
44 ; INL-MOD-NEXT: call void @bar()
45 ; INL-MOD: define void @bar()
46 ; INL-MOD-NEXT: call void @foo()
47 ; INL-MOD-LABEL:*** IR Dump After InlinerPass on (tester) ***
48 ; INL-MOD-NEXT: ModuleID =
49 ; INL-MOD-NEXT: source_filename =
50 ; INL-MOD: define void @tester()
51 ; INL-MOD-NEXT: call void @foo()
52 ; INL-MOD: define void @foo()
53 ; INL-MOD-NEXT: call void @bar()
54 ; INL-MOD: define void @bar()
55 ; INL-MOD-NEXT: call void @foo()
56 ; INL-MOD: IR Dump After
57 ; INL-MOD-NEXT: ModuleID =
58 ; INL-MOD-NEXT: source_filename =
59 ; INL-MOD-NOT: Printing <null> Function
61 define void @tester() noinline {
66 define void @foo() noinline {
71 define void @bar() noinline {