blob: 5730f75b5b07cfda8ea3a118b24df14f077f5565 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -aa-eval
2
3implementation
4
5void %test1() {
6 %X = malloc int*
7 %Y = malloc int
8 %Z = cast int* %Y to int
9 %W = cast int %Z to int*
10 store int* %W, int** %X
11 ret void
12}
13
14void %test2(int* %P) {
15 %X = malloc int*
16 %Y = malloc int
17 store int* %P, int** %X
18 ret void
19}
20
21internal int *%test3(int* %P) {
22 ret int* %P
23}
24
25void %test4() {
26 %X = malloc int
27 %Y = call int* %test3(int* %X)
28 %ZZ = getelementptr int* null, int 17
29 ret void
30}