Spare '&' in the RUN line.
[oota-llvm.git] / test / Transforms / GlobalOpt / malloc-promote-3.llx
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -globalopt | llvm-dis | not grep malloc
2
3 %G = internal global int* null
4
5 void %init() {
6         %P = malloc int, uint 100
7         store int* %P, int** %G
8
9         %GV = load int** %G
10         %GVe = getelementptr int* %GV, int 40
11         store int 20, int* %GVe
12         ret void
13 }
14
15 int %get() {
16         %GV = load int** %G
17         %GVe = getelementptr int* %GV, int 40
18         %V = load int* %GVe
19         ret int %V
20 }
21
22 bool %check() {    ;; Return true if init has been called
23         %GV = load int** %G
24         %V = seteq int* %GV, null
25         ret bool %V
26 }