mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 07:28:52 +00:00
Add tests
This commit is contained in:
22
examples/ir3/foo2.ir
Normal file
22
examples/ir3/foo2.ir
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
fun i32 @main () {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
|
||||
|
||||
block b0:
|
||||
j b2(0:i32)
|
||||
|
||||
block b2:
|
||||
%b2:p0:i32:i
|
||||
%b2:i0:u1 = cmp lt %b2:p0:i32 10:i32
|
||||
br %b2:i0:u1, b3(), b5()
|
||||
|
||||
block b3:
|
||||
%b3:i0:i32 = add %b2:p0:i32 1:i32
|
||||
j b2(%b3:i0:i32)
|
||||
|
||||
block b5:
|
||||
ret 1:i32
|
||||
}
|
||||
Reference in New Issue
Block a user