46 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals2; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT3; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC4 5%struct.wobble = type { i32 }6%struct.zot = type { %struct.wobble, %struct.wobble, %struct.wobble }7 8declare dso_local fastcc float @bar(ptr noalias, <8 x i32>) unnamed_addr9 10define %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 {{[^@]+}}@widget13; CHECK-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {14; CHECK-NEXT: bb:15; CHECK-NEXT: ret [[STRUCT_ZOT:%.*]] undef16;17bb:18 ret %struct.zot undef19}20 21define 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 {{[^@]+}}@baz24; TUNIT-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR0]] {25; TUNIT-NEXT: bb:26; TUNIT-NEXT: [[TMP1:%.*]] = extractvalue [[STRUCT_ZOT:%.*]] undef, 0, 027; TUNIT-NEXT: ret void28;29; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)30; CGSCC-LABEL: define {{[^@]+}}@baz31; CGSCC-SAME: (<8 x i32> [[ARG:%.*]]) local_unnamed_addr #[[ATTR1:[0-9]+]] {32; CGSCC-NEXT: bb:33; CGSCC-NEXT: ret void34;35bb:36 %tmp = call %struct.zot @widget(<8 x i32> %arg)37 %tmp1 = extractvalue %struct.zot %tmp, 0, 038 ret void39}40;.41; TUNIT: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }42;.43; CGSCC: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }44; CGSCC: attributes #[[ATTR1]] = { mustprogress nofree nosync nounwind willreturn memory(none) }45;.46