Home | History | Annotate | Download | only in GlobalsModRef
      1 ; RUN: opt < %s -globals-aa -gvn -S | FileCheck %s
      2 
      3 @g = internal global i32 0		; <i32*> [#uses=2]
      4 
      5 define i32 @r() {
      6 	%tmp = load i32, i32* @g		; <i32> [#uses=1]
      7 	ret i32 %tmp
      8 }
      9 
     10 define i32 @f() {
     11 ; CHECK: call i32 @e()
     12 ; CHECK: call i32 @e()
     13 entry:
     14 	%tmp = call i32 @e( )		; <i32> [#uses=1]
     15 	store i32 %tmp, i32* @g
     16 	%tmp2 = call i32 @e( )		; <i32> [#uses=1]
     17 	ret i32 %tmp2
     18 }
     19 
     20 declare i32 @e() readonly	; might call @r
     21