Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | opt -anders-aa -aa-eval |
2 | |||||
3 | implementation | ||||
4 | |||||
5 | void %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 | |||||
14 | void %test2(int* %P) { | ||||
15 | %X = malloc int* | ||||
16 | %Y = malloc int | ||||
17 | store int* %P, int** %X | ||||
18 | ret void | ||||
19 | } | ||||
20 | |||||
21 | internal int *%test3(int* %P) { | ||||
22 | ret int* %P | ||||
23 | } | ||||
24 | |||||
25 | void %test4() { | ||||
26 | %X = malloc int | ||||
27 | %Y = call int* %test3(int* %X) | ||||
28 | %ZZ = getelementptr int* null, int 17 | ||||
29 | ret void | ||||
30 | } |