blob: 12d4c6d5bb293f36bfc6f2e6e991ba16a1bd1c9a [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | 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}