40 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; CHECK-NOT: %X6 7define internal i32 @foo(i32 %X) {8; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)9; CGSCC-LABEL: define {{[^@]+}}@foo10; CGSCC-SAME: () #[[ATTR0:[0-9]+]] {11; CGSCC-NEXT: ret i32 undef12;13 %Y = call i32 @foo( i32 %X ) ; <i32> [#uses=1]14 %Z = add i32 %Y, 1 ; <i32> [#uses=1]15 ret i32 %Z16}17 18define void @bar() {19; TUNIT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)20; TUNIT-LABEL: define {{[^@]+}}@bar21; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {22; TUNIT-NEXT: ret void23;24; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)25; CGSCC-LABEL: define {{[^@]+}}@bar26; CGSCC-SAME: () #[[ATTR0]] {27; CGSCC-NEXT: ret void28;29 call i32 @foo( i32 17 ) ; <i32>:1 [#uses=0]30 ret void31}32 33;.34; TUNIT: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }35;.36; CGSCC: attributes #[[ATTR0]] = { mustprogress nofree nosync nounwind willreturn memory(none) }37;.38;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:39; CHECK: {{.*}}40