blob: f231963f57e37f932947e37efbb7302c008cb630 [file] [log] [blame]
Chris Lattner214956d2004-10-11 05:00:12 +00001; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep malloc
2
3%G = internal global int* null
4
5void %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
15int %get() {
16 %GV = load int** %G
17 %GVe = getelementptr int* %GV, int 40
18 %V = load int* %GVe
19 ret int %V
20}