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 ; Should not propagate the result of a weak function.
8 define weak i32 @foo() nounwind {
9 ; CHECK: Function Attrs: nounwind
10 ; CHECK-LABEL: define {{[^@]+}}@foo
11 ; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
13 ; CHECK-NEXT: ret i32 1
19 define i32 @main() nounwind {
20 ; CHECK: Function Attrs: nounwind
21 ; CHECK-LABEL: define {{[^@]+}}@main
22 ; CHECK-SAME: () #[[ATTR0]] {
24 ; CHECK-NEXT: [[R:%.*]] = call i32 @foo() #[[ATTR0]]
25 ; CHECK-NEXT: ret i32 [[R]]
28 %r = call i32 @foo( ) nounwind
33 ; CHECK: attributes #[[ATTR0]] = { nounwind }
35 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: