1; RUN: opt -S -function-attrs < %s | FileCheck %s
2; RUN: opt -S -passes=function-attrs < %s | FileCheck %s
3
4@i = global i32 0
5
6define void @foo() {
7; CHECK-LABEL: define void @foo() #0 {
8  store i32 1, i32* @i
9  call void @bar()
10  ret void
11}
12
13define void @bar() {
14; CHECK-LABEL: define void @bar() #0 {
15  %i = load i32, i32* @i
16  call void @foo()
17  ret void
18}
19
20; CHECK: attributes #0 = { nofree nounwind }
21