Heuristic: If the number of operands in the alias are more than the number of
[llvm/stm8.git] / test / Analysis / GlobalsModRef / 2008-09-03-ReadGlobals.ll
blob17ace8a950bbbf25e987ca3905a1b1115160dba4
1 ; RUN: opt < %s -globalsmodref-aa -gvn -S | grep call | count 2
3 @g = internal global i32 0              ; <i32*> [#uses=2]
5 define i32 @r() {
6         %tmp = load i32* @g             ; <i32> [#uses=1]
7         ret i32 %tmp
10 define i32 @f() {
11 entry:
12         %tmp = call i32 @e( )           ; <i32> [#uses=1]
13         store i32 %tmp, i32* @g
14         %tmp2 = call i32 @e( )          ; <i32> [#uses=1]
15         ret i32 %tmp2
18 declare i32 @e() readonly       ; might call @r