xref: /llvm-project/llvm/test/Transforms/FunctionAttrs/2008-09-03-Mutual.ll (revision 304f1d59ca41872c094def3aee0a8689df6aa398)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes
2; RUN: opt < %s -passes=function-attrs -S | FileCheck %s
3
4define i32 @a() {
5; CHECK: Function Attrs: nofree nosync nounwind memory(none)
6; CHECK-LABEL: define {{[^@]+}}@a
7; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
8; CHECK-NEXT:    [[TMP:%.*]] = call i32 @b()
9; CHECK-NEXT:    ret i32 [[TMP]]
10;
11  %tmp = call i32 @b()
12  ret i32 %tmp
13}
14
15define i32 @b() {
16; CHECK: Function Attrs: nofree nosync nounwind memory(none)
17; CHECK-LABEL: define {{[^@]+}}@b
18; CHECK-SAME: () #[[ATTR0]] {
19; CHECK-NEXT:    [[TMP:%.*]] = call i32 @a()
20; CHECK-NEXT:    ret i32 [[TMP]]
21;
22  %tmp = call i32 @a()
23  ret i32 %tmp
24}
25