1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
2 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
3 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
5 %struct.wobble = type { i32 }
6 %struct.zot = type { %struct.wobble, %struct.wobble, %struct.wobble }
8 declare dso_local fastcc float @bar(ptr noalias, <8 x i32>) unnamed_addr
10 define %struct.zot @widget(<8 x i32> %arg) local_unnamed_addr {
11 ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
12 ; CHECK-LABEL: define {{[^@]+}}@widget
13 ; CHECK-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
15 ; CHECK-NEXT: ret [[STRUCT_ZOT:%.*]] undef
21 define void @baz(<8 x i32> %arg) local_unnamed_addr {
22 ; TUNIT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
23 ; TUNIT-LABEL: define {{[^@]+}}@baz
24 ; TUNIT-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0]] {
26 ; TUNIT-NEXT: [[TMP1:%.*]] = extractvalue [[STRUCT_ZOT:%.*]] undef, 0, 0
27 ; TUNIT-NEXT: ret void
29 ; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
30 ; CGSCC-LABEL: define {{[^@]+}}@baz
31 ; CGSCC-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {
33 ; CGSCC-NEXT: ret void
36 %tmp = call %struct.zot @widget(<8 x i32> %arg)
37 %tmp1 = extractvalue %struct.zot %tmp, 0, 0
41 ; TUNIT: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
43 ; CGSCC: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
44 ; CGSCC: attributes #[[ATTR1]] = { mustprogress nofree nosync nounwind willreturn memory(none) }