blob: fb6b1dad4ef7c6ddc74c8e312de639bbc46fe1d9 [file] [log] [blame]
Reid Spencer69ccadd2006-12-02 04:23:10 +00001; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep alloca | grep '4 x'
Chris Lattneraa8ca2d2003-05-29 21:07:34 +00002
3; Test that an array is not incorrectly deconstructed...
4
5int %test() {
6 %X = alloca [4 x int]
7 %Y = getelementptr [4 x int]* %X, long 0, long 0
8 %Z = getelementptr int* %Y, long 1 ; Must preserve arrayness!
9 %A = load int* %Z
10 ret int %A
11}