| Reid Spencer | d0e30dc | 2006-12-02 04:23:10 +0000 | [diff] [blame] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | opt -argpromotion -instcombine | llvm-dis | not grep load |
| Chris Lattner | 332a8bd | 2004-03-07 22:52:41 +0000 | [diff] [blame] | 2 | |
| 3 | %G1 = constant int 0 | ||||
| 4 | %G2 = constant int* %G1 | ||||
| 5 | |||||
| 6 | implementation | ||||
| 7 | |||||
| 8 | internal int %test(int **%X) { | ||||
| 9 | %Y = load int** %X | ||||
| 10 | %X = load int* %Y | ||||
| 11 | ret int %X | ||||
| 12 | } | ||||
| 13 | |||||
| 14 | int %caller(int** %P) { | ||||
| 15 | %X = call int %test(int** %G2) | ||||
| 16 | ret int %X | ||||
| 17 | } | ||||