1 ; RUN: opt < %s -function-attrs -S | FileCheck %s
2 ; RUN: opt < %s -passes=function-attrs -S | FileCheck %s
4 ; CHECK: define void @nouses-argworn-funrn(i32* nocapture readnone %.aaa) #0 {
5 define void @nouses-argworn-funrn(i32* writeonly %.aaa) {
6 nouses-argworn-funrn_entry:
10 ; CHECK: define void @nouses-argworn-funro(i32* nocapture readnone %.aaa, i32* nocapture readonly %.bbb) #1 {
11 define void @nouses-argworn-funro(i32* writeonly %.aaa, i32* %.bbb) {
12 nouses-argworn-funro_entry:
13 %val = load i32 , i32* %.bbb
17 %_type_of_d-ccc = type <{ i8*, i8, i8, i8, i8 }>
19 @d-ccc = internal global %_type_of_d-ccc <{ i8* null, i8 1, i8 13, i8 0, i8 -127 }>, align 8
21 ; CHECK: define void @nouses-argworn-funwo(i32* nocapture readnone %.aaa) #2 {
22 define void @nouses-argworn-funwo(i32* writeonly %.aaa) {
23 nouses-argworn-funwo_entry:
24 store i8 0, i8* getelementptr inbounds (%_type_of_d-ccc, %_type_of_d-ccc* @d-ccc, i32 0, i32 3)
28 ; CHECK: attributes #0 = { {{.*}}readnone{{.*}} }
29 ; CHECK: attributes #1 = { {{.*}}readonly{{.*}} }
30 ; CHECK: attributes #2 = { {{.*}}writeonly{{.*}} }