Remove DSA.
[oota-llvm.git] / test / Analysis / DSGraph / 2005-03-24-Global-Arg-Alias.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -ds-aa -load-vn -gcse | llvm-dis | grep 'load int\* %L'
2
3 %G = internal global int* null
4
5 int %caller(bool %P) {
6   %L = alloca int
7   call void %callee(bool %P, int* %L)
8
9   ;; At this point, G could point to L, so we can't eliminate these operations.
10   %GP = load int** %G
11   store int 17, int* %L
12   store int 18, int* %GP  ;; might clober L
13
14   %A = load int* %L    ;; is not necessarily 17!
15   ret int %A
16 }
17
18 internal void %callee(bool %Cond, int* %P) {
19   br bool %Cond, label %T, label %F
20 T:
21   store int* %P, int** %G
22   ret void
23 F:
24   ret void
25 }
26