Home | History | Annotate | Download | only in FunctionAttrs
      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() #1
     14 define i32 @g() readonly {
     15 	ret i32 0
     16 }
     17 
     18 ; CHECK: define i32 @h() #1
     19 define i32 @h() readnone {
     20 	%tmp = load i32, i32* @x		; <i32> [#uses=1]
     21 	ret i32 %tmp
     22 }
     23 
     24 ; CHECK: attributes #0 = { readnone }
     25 ; CHECK: attributes #1 = { norecurse readnone }
     26