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=1 -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=1 -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 %struct.wobble = type { i32 }
8 %struct.zot = type { %struct.wobble, %struct.wobble, %struct.wobble }
10 declare dso_local fastcc float @bar(%struct.wobble* noalias, <8 x i32>) unnamed_addr
12 define %struct.zot @widget(<8 x i32> %arg) local_unnamed_addr {
13 ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
14 ; IS__TUNIT____-LABEL: define {{[^@]+}}@widget
15 ; IS__TUNIT____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
16 ; IS__TUNIT____-NEXT: bb:
17 ; IS__TUNIT____-NEXT: ret [[STRUCT_ZOT:%.*]] undef
19 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
20 ; IS__CGSCC____-LABEL: define {{[^@]+}}@widget
21 ; IS__CGSCC____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
22 ; IS__CGSCC____-NEXT: bb:
23 ; IS__CGSCC____-NEXT: ret [[STRUCT_ZOT:%.*]] undef
29 define void @baz(<8 x i32> %arg) local_unnamed_addr {
30 ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
31 ; IS__TUNIT____-LABEL: define {{[^@]+}}@baz
32 ; IS__TUNIT____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0]] {
33 ; IS__TUNIT____-NEXT: bb:
34 ; IS__TUNIT____-NEXT: [[TMP1:%.*]] = extractvalue [[STRUCT_ZOT:%.*]] undef, 0, 0
35 ; IS__TUNIT____-NEXT: ret void
37 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
38 ; IS__CGSCC____-LABEL: define {{[^@]+}}@baz
39 ; IS__CGSCC____-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0]] {
40 ; IS__CGSCC____-NEXT: bb:
41 ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = extractvalue [[STRUCT_ZOT:%.*]] undef, 0, 0
42 ; IS__CGSCC____-NEXT: ret void
45 %tmp = call %struct.zot @widget(<8 x i32> %arg)
46 %tmp1 = extractvalue %struct.zot %tmp, 0, 0
50 ; IS__TUNIT____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
52 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }