For PR1319:
[oota-llvm.git] / test / Transforms / ScalarRepl / 2003-09-12-IncorrectPromote.ll
1 ; Scalar replacement was incorrectly promoting this alloca!!
2 ;
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
4 ; RUN:   sed {s/;.*//g} | grep \[
5
6 sbyte *%test() {
7         %A = alloca [30 x sbyte]
8         %B = getelementptr [30 x sbyte]* %A, long 0, long 0
9         %C = getelementptr sbyte* %B, long 1
10         store sbyte 0, sbyte* %B
11         ret sbyte* %C
12 }