mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-18 08:28:51 +00:00
Update skeleton
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
struct color : { i32, i8 }
|
||||
|
||||
fun i32 @main {
|
||||
fun i32 @main () {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
@@ -23,13 +23,13 @@ block b0:
|
||||
%b0:i8:u64 = add %b0:i7:u64 1:u64
|
||||
%b0:i9:i32 = typecast %b0:i8:u64 to i32
|
||||
%b0:i10:unit = store %b0:i9:i32 %l0:*i32
|
||||
%b0:i11:*i32 = getelementptr %l1 offset 0
|
||||
%b0:i11:*i32 = getelementptr %l1:* struct color offset 0:i64
|
||||
%b0:i12:unit = store 1:i32 %b0:i11:*i32
|
||||
%b0:i13:*i8 = getelementptr %l1 offset 4
|
||||
%b0:i13:*i8 = getelementptr %l1:* struct color offset 4:i64
|
||||
%b0:i14:i8 = typecast 2:i32 to i8
|
||||
%b0:i15:unit = store %b0:i14:i8 %b0:i13:*i8
|
||||
%b0:i16:i32 = load %l0:*i32
|
||||
%b0:i17:*i8 = getelementptr %l1 offset 4
|
||||
%b0:i17:*i8 = getelementptr %l1:* struct color offset 4:i64
|
||||
%b0:i18:i8 = load %b0:i17:*i8
|
||||
%b0:i19:i32 = typecast %b0:i18:i8 to i32
|
||||
%b0:i20:i32 = add %b0:i16:i32 %b0:i19:i32
|
||||
@@ -38,7 +38,7 @@ block b0:
|
||||
%b0:i23:unit = store %l1:* struct color %l2:** struct color
|
||||
%b0:i24:i32 = load %l0:*i32
|
||||
%b0:i25:* struct color = load %l2:** struct color
|
||||
%b0:i26:*i8 = getelementptr %b0:i25 offset 4
|
||||
%b0:i26:*i8 = getelementptr %b0:i25:* struct color offset 4:i64
|
||||
%b0:i27:i8 = load %b0:i26:*i8
|
||||
%b0:i28:i32 = typecast %b0:i27:i8 to i32
|
||||
%b0:i29:i32 = add %b0:i24:i32 %b0:i28:i32
|
||||
|
||||
Reference in New Issue
Block a user