summaryrefslogtreecommitdiff
path: root/test/Transforms/DSAnalysis/indcalltest.ll
blob: 79ed1ae773066c8b94a35fa483a380bede8b6a54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
;
; RUN: llvm-upgrade < %s | llvm-as | opt -analyze -tddatastructure

%G = global int 2		; <int*> [#uses=1]
%H = global int* null

%I = global int** null
%J = global int** null

implementation   ; Functions:

void %foo1() {
	store int* %G, int** %H
        store int** %H, int ***%I
	ret void
}

void %foo2() {		; No predecessors!
	store int 7, int* %G
	store int** %H, int ***%J
	ret void
}

void %test(bool %cond) {
; <label>:0		; No predecessors!
	br bool %cond, label %call, label %F

F:		; preds = %0
	br label %call

call:		; preds = %F, %0
	%Fn = phi void ()* [ %foo2, %F ], [ %foo1, %0 ]		; <void ()*> [#uses=1]
	call void %Fn()
	ret void
}