mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
21a82e6fc7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29924 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
634 B
LLVM
36 lines
634 B
LLVM
;
|
|
; RUN: llvm-as < %s | 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
|
|
}
|