2 ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
4 ; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep {ret i8}
7 target pointersize = 32
8 target triple = "i686-apple-darwin8.7.2"
10 %struct.Val = type { int*, int }
12 implementation ; Functions:
14 sbyte* %test(short* %X) {
15 %X_addr = alloca short*
16 store short* %X, short** %X_addr
17 %X_addr = cast short** %X_addr to sbyte**
18 %tmp = load sbyte** %X_addr
22 void %test2(long %Op.0) {
23 %tmp = alloca %struct.Val, align 8
24 %tmp1 = alloca %struct.Val, align 8
25 %tmp = call ulong %_Z3foov( )
26 %tmp1 = cast %struct.Val* %tmp1 to ulong*
27 store ulong %tmp, ulong* %tmp1
28 %tmp = getelementptr %struct.Val* %tmp, int 0, uint 0
29 %tmp2 = getelementptr %struct.Val* %tmp1, int 0, uint 0
30 %tmp = load int** %tmp2
31 store int* %tmp, int** %tmp
32 %tmp3 = getelementptr %struct.Val* %tmp, int 0, uint 1
33 %tmp4 = getelementptr %struct.Val* %tmp1, int 0, uint 1
34 %tmp = load int* %tmp4
35 store int %tmp, int* %tmp3
36 %tmp7 = cast %struct.Val* %tmp to { long }*
37 %tmp8 = getelementptr { long }* %tmp7, int 0, uint 0
38 %tmp9 = load long* %tmp8
39 call void %_Z3bar3ValS_( long %Op.0, long %tmp9 )
43 declare ulong %_Z3foov()
45 declare void %_Z3bar3ValS_(long, long)