Chris Lattner | 016d7b9 | 2003-05-27 15:51:17 +0000 | [diff] [blame^] | 1 | ; RUN: if as < %s | opt -scalarrepl -mem2reg | dis | grep alloca |
2 | ; RUN: then exit 1 | ||||
3 | ; RUN: else exit 0 | ||||
4 | ; RUN: fi | ||||
5 | |||||
6 | int %test() { | ||||
7 | %X = alloca [ 4 x int ] | ||||
8 | %Y = getelementptr [4x int]* %X, long 0, long 0 | ||||
9 | store int 0, int* %Y | ||||
10 | |||||
11 | %Z = load int* %Y | ||||
12 | ret int %Z | ||||
13 | } |