New testcases
[oota-llvm.git] / test / Transforms / DSAnalysis / indcalltest.ll
1 %G = global int 2               ; <int*> [#uses=1]
2 %H = global int* null
3
4 %I = global int** null
5 %J = global int** null
6
7 implementation   ; Functions:
8
9 void %foo1() {
10         store int* %G, int** %H
11         store int** %H, int ***%I
12         ret void
13 }
14
15 void %foo2() {          ; No predecessors!
16         store int 7, int* %G
17         store int** %H, int ***%J
18         ret void
19 }
20
21 void %test(bool %cond) {
22 ; <label>:0             ; No predecessors!
23         br bool %cond, label %call, label %F
24
25 F:              ; preds = %0
26         br label %call
27
28 call:           ; preds = %F, %0
29         %Fn = phi void ()* [ %foo2, %F ], [ %foo1, %0 ]         ; <void ()*> [#uses=1]
30         call void %Fn()
31         ret void
32 }