Reid Spencer | 9aafdcf | 2007-04-15 09:21:47 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \ |
2 | ; RUN: grep alloca | grep {4 x} | ||||
Chris Lattner | aa8ca2d | 2003-05-29 21:07:34 +0000 | [diff] [blame] | 3 | |
4 | ; Test that an array is not incorrectly deconstructed... | ||||
5 | |||||
6 | int %test() { | ||||
7 | %X = alloca [4 x int] | ||||
8 | %Y = getelementptr [4 x int]* %X, long 0, long 0 | ||||
9 | %Z = getelementptr int* %Y, long 1 ; Must preserve arrayness! | ||||
10 | %A = load int* %Z | ||||
11 | ret int %A | ||||
12 | } |