1 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
2 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3 ; RUN: diff %t1.ll %t2.ll
5 %struct = type { int , {float, {ubyte } } , ulong }
6 %complexty = type {int, {[4 x sbyte *], float}, double}
12 call int %testfunction(long 0, long 1)
16 int "testfunction"(long %i0, long %j0)
18 %array0 = malloc [4 x ubyte] ; yields {[4 x ubyte]*}:array0
19 %size = add uint 2, 2 ; yields {uint}:size = uint %4
20 %array1 = malloc ubyte, uint 4 ; yields {ubyte*}:array1
21 %array2 = malloc ubyte, uint %size ; yields {ubyte*}:array2
23 %idx = getelementptr [4 x ubyte]* %array0, long 0, long 2
24 store ubyte 123, ubyte* %idx
25 free [4x ubyte]* %array0
30 %aa = alloca %complexty, uint 5
31 %idx2 = getelementptr %complexty* %aa, long %i0, uint 1, uint 0, long %j0
32 store sbyte *null, sbyte** %idx2
34 %ptr = alloca int ; yields {int*}:ptr
35 store int 3, int* %ptr ; yields {void}
36 %val = load int* %ptr ; yields {int}:val = int %3
38 %sptr = alloca %struct ; yields {%struct*}:sptr
39 %ubsptr = getelementptr %struct * %sptr, long 0, uint 1, uint 1 ; yields {{ubyte}*}:ubsptr
40 %idx3 = getelementptr {ubyte} * %ubsptr, long 0, uint 0
41 store ubyte 4, ubyte* %idx3