blob: c9ccd6cdba1dc6ac3bcefe908739f504c5237056 [file] [log] [blame]
Chris Lattner00950542001-06-06 20:29:01 +00001%struct = type int *
2
3implementation
4
5int "test function"(int %i0, int %j0)
6begin
7 %array0 = malloc [4 x ubyte] ; yields {[4 x ubyte]*}:array0
8 %size = add uint 2, 2 ; yields {uint}:size = uint %4
9 %array1 = malloc [ubyte], uint 4 ; yields {[ubyte]*}:array1
10 %array2 = malloc [ubyte], uint %size ; yields {[ubyte]*}:array2
11 free [4x ubyte]* %array0
12 free [ubyte]* %array1
13 free [ubyte]* %array2
14
15
16 alloca [ubyte], uint 5
17 %ptr = alloca int ; yields {int*}:ptr
18 ;store int* %ptr, int 3 ; yields {void}
19 ;%val = load int* %ptr ; yields {int}:val = int %3
20
21 ret int 3
22end
23