1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
2 ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
3 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
4 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
5 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
7 @_ZL6test1g = internal global i32 42, align 4
10 ; CHECK: @[[_ZL6TEST1G:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 42, align 4
12 define void @_Z7test1f1v() nounwind {
13 ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
14 ; IS__TUNIT____-LABEL: define {{[^@]+}}@_Z7test1f1v
15 ; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
16 ; IS__TUNIT____-NEXT: entry:
17 ; IS__TUNIT____-NEXT: br label [[IF_END:%.*]]
18 ; IS__TUNIT____: if.then:
19 ; IS__TUNIT____-NEXT: unreachable
20 ; IS__TUNIT____: if.end:
21 ; IS__TUNIT____-NEXT: ret void
23 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
24 ; IS__CGSCC____-LABEL: define {{[^@]+}}@_Z7test1f1v
25 ; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
26 ; IS__CGSCC____-NEXT: entry:
27 ; IS__CGSCC____-NEXT: br label [[IF_END:%.*]]
28 ; IS__CGSCC____: if.then:
29 ; IS__CGSCC____-NEXT: unreachable
30 ; IS__CGSCC____: if.end:
31 ; IS__CGSCC____-NEXT: ret void
34 %tmp = load i32, i32* @_ZL6test1g, align 4
35 %cmp = icmp eq i32 %tmp, 0
36 br i1 %cmp, label %if.then, label %if.end
38 if.then: ; preds = %entry
39 store i32 0, i32* @_ZL6test1g, align 4
42 if.end: ; preds = %if.then, %entry
46 define i32 @_Z7test1f2v() nounwind {
47 ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
48 ; IS__TUNIT____-LABEL: define {{[^@]+}}@_Z7test1f2v
49 ; IS__TUNIT____-SAME: () #[[ATTR0]] {
50 ; IS__TUNIT____-NEXT: entry:
51 ; IS__TUNIT____-NEXT: ret i32 42
53 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
54 ; IS__CGSCC____-LABEL: define {{[^@]+}}@_Z7test1f2v
55 ; IS__CGSCC____-SAME: () #[[ATTR0]] {
56 ; IS__CGSCC____-NEXT: entry:
57 ; IS__CGSCC____-NEXT: ret i32 42
60 %tmp = load i32, i32* @_ZL6test1g, align 4
64 ; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
66 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }