2003-09-12 23:44:01 +08:00
|
|
|
; Scalar replacement was incorrectly promoting this alloca!!
|
|
|
|
;
|
2007-04-15 17:21:47 +08:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
|
|
|
|
; RUN: sed {s/;.*//g} | grep \[
|
2003-09-12 23:44:01 +08:00
|
|
|
|
|
|
|
sbyte *%test() {
|
|
|
|
%A = alloca [30 x sbyte]
|
|
|
|
%B = getelementptr [30 x sbyte]* %A, long 0, long 0
|
|
|
|
%C = getelementptr sbyte* %B, long 1
|
|
|
|
store sbyte 0, sbyte* %B
|
|
|
|
ret sbyte* %C
|
|
|
|
}
|