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:
19
examples/opt/lost_copy.ir
Normal file
19
examples/opt/lost_copy.ir
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
fun i32 @main () {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
|
||||
|
||||
block b0:
|
||||
j b1(0:i32)
|
||||
|
||||
block b1:
|
||||
%b1:p0:i32:i
|
||||
%b1:i0:i32 = add %b1:p0:i32 1:i32
|
||||
%b1:i1:u1 = cmp lt %b1:i0:i32 4:i32
|
||||
br %b1:i1:u1, b1(%b1:i0:i32), b3()
|
||||
|
||||
block b3:
|
||||
ret %b1:p0:i32
|
||||
}
|
||||
Reference in New Issue
Block a user