1 ; This test is checking basic properties of -print-module-scope options:
2 ; - dumps all the module IR at once
3 ; - all the function attributes are shown, including those of declarations
4 ; - works on top of -print-after and -filter-print-funcs
6 ; RUN: opt < %s 2>&1 -disable-output \
7 ; RUN: -passes=simplifycfg -print-after-all -print-module-scope \
8 ; RUN: | FileCheck %s -check-prefix=CFG
9 ; RUN: opt < %s 2>&1 -disable-output \
10 ; RUN: -passes=simplifycfg -print-after=simplifycfg -print-module-scope \
11 ; RUN: | FileCheck %s -check-prefix=CFG
12 ; RUN: opt < %s 2>&1 -disable-output \
13 ; RUN: -passes=simplifycfg -print-after=simplifycfg -filter-print-funcs=foo -print-module-scope \
14 ; RUN: | FileCheck %s -check-prefix=FOO
16 ; CFG: IR Dump After {{Simplify the CFG|SimplifyCFGPass}} {{.*}}foo
17 ; CFG-NEXT: ModuleID =
18 ; CFG: define void @foo
19 ; CFG: define void @bar
20 ; CFG: declare void @baz
21 ; CFG: IR Dump After {{.*}}bar
22 ; CFG-NEXT: ModuleID =
23 ; CFG: define void @foo
24 ; CFG: define void @bar
25 ; CFG: declare void @baz
27 ; FOO: IR Dump After {{Simplify the CFG|SimplifyCFGPass}} {{.*foo}}
28 ; FOO-NEXT: ModuleID =
29 ; FOO: Function Attrs: nounwind ssp
30 ; FOO: define void @foo
31 ; FOO: Function Attrs: nounwind
32 ; FOO: define void @bar
33 ; FOO: Function Attrs: nounwind readnone ssp
34 ; FOO: declare void @baz
36 define void @foo() nounwind ssp {
41 define void @bar() #0 {
45 declare void @baz() #1
47 attributes #0 = { nounwind "frame-pointer"="all" }
49 attributes #1 = { nounwind readnone ssp "use-soft-float"="false" }
50 ; FOO: attributes #{{[0-9]}} = { nounwind "frame-pointer"="all" }
52 ; FOO: attributes #{{[0-9]}} = { nounwind readnone ssp "use-soft-float"="false" }
54 ; FOO-NOT: IR Dump After {{Simplify the CFG|SimplifyCFGPass}}