mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-14 22:38:46 +00:00
Prepare for Spring 2025.
This commit is contained in:
29
examples/ir2/lost_copy.ir
Normal file
29
examples/ir2/lost_copy.ir
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
fun i32 @main () {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
%l0:i32:i
|
||||
%l1:i32:result
|
||||
|
||||
block b0:
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
j b1(0:i32, 0:i32)
|
||||
|
||||
block b1:
|
||||
%b1:p0:i32:i
|
||||
%b1:p1:i32:result
|
||||
%b1:i0:unit = nop
|
||||
%b1:i1:unit = nop
|
||||
%b1:i2:unit = nop
|
||||
%b1:i3:i32 = add %b1:p0:i32 1:i32
|
||||
%b1:i4:unit = nop
|
||||
%b1:i5:unit = nop
|
||||
%b1:i6:u1 = cmp lt %b1:i3:i32 4:i32
|
||||
br %b1:i6:u1, b1(%b1:i3:i32, %b1:p0:i32), b3()
|
||||
|
||||
block b3:
|
||||
%b3:i0:unit = nop
|
||||
ret %b1:p0:i32
|
||||
}
|
||||
Reference in New Issue
Block a user