1; RUN: opt < %s -functionattrs -S | FileCheck %s
2; RUN: opt < %s -passes=function-attrs -S | FileCheck %s
3
4; CHECK: define void @bar(i8* nocapture readnone %0)
5define void @bar(i8* readonly %0) {
6  call void @foo(i8* %0)
7    ret void
8}
9
10; CHECK: define void @foo(i8* nocapture readnone %0)
11define void @foo(i8* readonly %0) {
12  call void @bar(i8* %0)
13  ret void
14}
15