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