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=18 -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=18 -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
10 define hidden i64 @f1() align 2 {
11 ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
12 ; IS__TUNIT____-LABEL: define {{[^@]+}}@f1
13 ; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] align 2 {
14 ; IS__TUNIT____-NEXT: entry:
15 ; IS__TUNIT____-NEXT: ret i64 undef
17 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
18 ; IS__CGSCC____-LABEL: define {{[^@]+}}@f1
19 ; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] align 2 {
20 ; IS__CGSCC____-NEXT: entry:
21 ; IS__CGSCC____-NEXT: [[REF_TMP:%.*]] = alloca [[A:%.*]], align 8
22 ; IS__CGSCC____-NEXT: ret i64 undef
25 %ref.tmp = alloca %"a", align 8
26 %call2 = call i64 @f2(%"a"* %ref.tmp)
30 define internal i64 @f2(%"a"* %this) align 2 {
31 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
32 ; IS__CGSCC____-LABEL: define {{[^@]+}}@f2
33 ; IS__CGSCC____-SAME: () #[[ATTR0]] align 2 {
34 ; IS__CGSCC____-NEXT: entry:
35 ; IS__CGSCC____-NEXT: ret i64 undef
38 %this.addr = alloca %"a"*, align 8
39 store %"a"* %this, %"a"** %this.addr, align 8
40 %this1 = load %"a"*, %"a"** %this.addr, align 8
41 %0 = bitcast %"a"* %this1 to %"b"*
42 call void @f3(%"b"* %0)
46 define internal void @f3(%"b"* %this) align 2 {
47 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
48 ; IS__CGSCC____-LABEL: define {{[^@]+}}@f3
49 ; IS__CGSCC____-SAME: () #[[ATTR0]] align 2 {
50 ; IS__CGSCC____-NEXT: entry:
51 ; IS__CGSCC____-NEXT: ret void
54 %this.addr = alloca %"b"*, align 8
55 store %"b"* %this, %"b"** %this.addr, align 8
56 %this1 = load %"b"*, %"b"** %this.addr, align 8
57 %call = call i1 @f4(%"b"* %this1)
61 define internal i1 @f4(%"b"* %this) align 2 {
62 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
63 ; IS__CGSCC____-LABEL: define {{[^@]+}}@f4
64 ; IS__CGSCC____-SAME: () #[[ATTR0]] align 2 {
65 ; IS__CGSCC____-NEXT: entry:
66 ; IS__CGSCC____-NEXT: ret i1 undef
69 %this.addr = alloca %"b"*, align 8
70 store %"b"* %this, %"b"** %this.addr, align 8
71 %this1 = load %"b"*, %"b"** %this.addr, align 8
72 %call = call %"a"* @f5(%"b"* %this1)
76 define internal %"a"* @f5(%"b"* %this) align 2 {
77 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
78 ; IS__CGSCC____-LABEL: define {{[^@]+}}@f5
79 ; IS__CGSCC____-SAME: () #[[ATTR0]] align 2 {
80 ; IS__CGSCC____-NEXT: entry:
81 ; IS__CGSCC____-NEXT: ret %a* undef
84 %this.addr = alloca %"b"*, align 8
85 store %"b"* %this, %"b"** %this.addr, align 8
86 %this1 = load %"b"*, %"b"** %this.addr, align 8
87 %0 = bitcast %"b"* %this1 to %"a"*
91 ; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
93 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }