Modify the LLVM assembly output so that it uses references to represent function...
[oota-llvm.git] / test / Transforms / FunctionAttrs / 2008-09-03-ReadNone.ll
1 ; RUN: opt < %s -basicaa -functionattrs -S | FileCheck %s
2 @x = global i32 0
3
4 ; CHECK: declare i32 @e() #0
5 declare i32 @e() readnone
6
7 ; CHECK: define i32 @f() #0
8 define i32 @f() {
9         %tmp = call i32 @e( )           ; <i32> [#uses=1]
10         ret i32 %tmp
11 }
12
13 ; CHECK: define i32 @g() #0
14 define i32 @g() readonly {
15         ret i32 0
16 }
17
18 ; CHECK: define i32 @h() #0
19 define i32 @h() readnone {
20         %tmp = load i32* @x             ; <i32> [#uses=1]
21         ret i32 %tmp
22 }
23
24 ; CHECK: attributes #0 = { readnone }