mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 07:28:52 +00:00
Update tests
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
struct %t0 : { [4 x [5 x i32]] }
|
||||
struct %t1 : { i8, struct %t0, f64 }
|
||||
struct %t1 : { a:i8, %anon:struct %t0, c:f64 }
|
||||
struct %t0 : { b:[4 x [5 x i32]] }
|
||||
|
||||
fun unit @init (i32, i32, *[5 x i32]) {
|
||||
fun unit @init (i32, i32, [5 x i32]*) {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
%l0:i32:row
|
||||
%l1:i32:col
|
||||
%l2:*[5 x i32]:arr
|
||||
%l2:[5 x i32]*:arr
|
||||
%l3:i32:i
|
||||
%l4:i32:j
|
||||
|
||||
@@ -44,16 +44,16 @@ block b8:
|
||||
%b8:i1:unit = nop
|
||||
%b8:i2:i64 = typecast %b2:p0:i32 to i64
|
||||
%b8:i3:i64 = mul %b8:i2:i64 20:i64
|
||||
%b8:i4:*[5 x i32] = getelementptr %b0:p2:*[5 x i32] offset %b8:i3:i64
|
||||
%b8:i5:*i32 = getelementptr %b8:i4:*[5 x i32] offset 0:i32
|
||||
%b8:i4:[5 x i32]* = getelementptr %b0:p2:[5 x i32]* offset %b8:i3:i64
|
||||
%b8:i5:i32* = getelementptr %b8:i4:[5 x i32]* offset 0:i32
|
||||
%b8:i6:unit = nop
|
||||
%b8:i7:i64 = typecast %b7:p0:i32 to i64
|
||||
%b8:i8:i64 = mul %b8:i7:i64 4:i64
|
||||
%b8:i9:*i32 = getelementptr %b8:i5:*i32 offset %b8:i8:i64
|
||||
%b8:i9:i32* = getelementptr %b8:i5:i32* offset %b8:i8:i64
|
||||
%b8:i10:unit = nop
|
||||
%b8:i11:unit = nop
|
||||
%b8:i12:i32 = mul %b2:p0:i32 %b7:p0:i32
|
||||
%b8:i13:unit = store %b8:i12:i32 %b8:i9:*i32
|
||||
%b8:i13:unit = store %b8:i12:i32 %b8:i9:i32*
|
||||
%b8:i14:unit = nop
|
||||
%b8:i15:i32 = add %b7:p0:i32 1:i32
|
||||
%b8:i16:unit = nop
|
||||
@@ -70,31 +70,31 @@ fun i32 @main () {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
%l0: struct %t1:temp
|
||||
%l0:struct %t1:temp
|
||||
%l1:i32:row
|
||||
%l2:i32:col
|
||||
%l3: struct %t1:temp2
|
||||
%l3:struct %t1:temp2
|
||||
|
||||
block b0:
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
%b0:i3:unit = nop
|
||||
%b0:i4:*[4 x [5 x i32]] = getelementptr %l0:* struct %t1 offset 4:i64
|
||||
%b0:i5:*[5 x i32] = getelementptr %b0:i4:*[4 x [5 x i32]] offset 0:i32
|
||||
%b0:i6:unit = call @init:*[ret:unit params:(i32, i32, *[5 x i32])](4:i32, 5:i32, %b0:i5:*[5 x i32])
|
||||
%b0:i7: struct %t1 = load %l0:* struct %t1
|
||||
%b0:i8:unit = store %b0:i7: struct %t1 %l3:* struct %t1
|
||||
%b0:i9:*[4 x [5 x i32]] = getelementptr %l3:* struct %t1 offset 4:i64
|
||||
%b0:i10:*[5 x i32] = getelementptr %b0:i9:*[4 x [5 x i32]] offset 0:i32
|
||||
%b0:i4:[4 x [5 x i32]]* = getelementptr %l0:struct %t1* offset 4:i64
|
||||
%b0:i5:[5 x i32]* = getelementptr %b0:i4:[4 x [5 x i32]]* offset 0:i32
|
||||
%b0:i6:unit = call @init:[ret:unit params:(i32, i32, [5 x i32]*)]*(4:i32, 5:i32, %b0:i5:[5 x i32]*)
|
||||
%b0:i7:struct %t1 = load %l0:struct %t1*
|
||||
%b0:i8:unit = store %b0:i7:struct %t1 %l3:struct %t1*
|
||||
%b0:i9:[4 x [5 x i32]]* = getelementptr %l3:struct %t1* offset 4:i64
|
||||
%b0:i10:[5 x i32]* = getelementptr %b0:i9:[4 x [5 x i32]]* offset 0:i32
|
||||
%b0:i11:i64 = typecast 2:i32 to i64
|
||||
%b0:i12:i64 = mul %b0:i11:i64 20:i64
|
||||
%b0:i13:*[5 x i32] = getelementptr %b0:i10:*[5 x i32] offset %b0:i12:i64
|
||||
%b0:i14:*i32 = getelementptr %b0:i13:*[5 x i32] offset 0:i32
|
||||
%b0:i13:[5 x i32]* = getelementptr %b0:i10:[5 x i32]* offset %b0:i12:i64
|
||||
%b0:i14:i32* = getelementptr %b0:i13:[5 x i32]* offset 0:i32
|
||||
%b0:i15:i64 = typecast 3:i32 to i64
|
||||
%b0:i16:i64 = mul %b0:i15:i64 4:i64
|
||||
%b0:i17:*i32 = getelementptr %b0:i14:*i32 offset %b0:i16:i64
|
||||
%b0:i18:i32 = load %b0:i17:*i32
|
||||
%b0:i17:i32* = getelementptr %b0:i14:i32* offset %b0:i16:i64
|
||||
%b0:i18:i32 = load %b0:i17:i32*
|
||||
%b0:i19:u1 = cmp eq %b0:i18:i32 6:i32
|
||||
%b0:i20:i32 = typecast %b0:i19:u1 to i32
|
||||
ret %b0:i20:i32
|
||||
|
||||
Reference in New Issue
Block a user