mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 07:28:52 +00:00
Update skeleton
This commit is contained in:
98
examples/simplify_cfg/const_prop.input.ir
Normal file
98
examples/simplify_cfg/const_prop.input.ir
Normal file
@@ -0,0 +1,98 @@
|
||||
fun i32 @const_prop_same {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
|
||||
block b0:
|
||||
br undef:i1 b1() b1()
|
||||
|
||||
block b1:
|
||||
ret 0:i1
|
||||
}
|
||||
|
||||
fun i32 @const_prop_true {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
|
||||
block b0:
|
||||
br 1:i1 b1() b2()
|
||||
|
||||
block b1:
|
||||
ret 0:i1
|
||||
|
||||
block b2:
|
||||
ret 0:i1
|
||||
}
|
||||
|
||||
fun i32 @const_prop_false {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
|
||||
block b0:
|
||||
br 0:i1 b1() b2()
|
||||
|
||||
block b1:
|
||||
ret 0:i1
|
||||
|
||||
block b2:
|
||||
ret 0:i1
|
||||
}
|
||||
|
||||
fun i32 @const_prop_switch_same {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
|
||||
block b0:
|
||||
switch 42:i32 default b1() [
|
||||
2:i32 b1()
|
||||
3:i32 b1()
|
||||
]
|
||||
|
||||
block b1:
|
||||
ret 0:i1
|
||||
}
|
||||
|
||||
fun i32 @const_prop_switch_case {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
|
||||
block b0:
|
||||
switch 2:i32 default b1() [
|
||||
2:i32 b2()
|
||||
3:i32 b3()
|
||||
]
|
||||
|
||||
block b1:
|
||||
ret 0:i1
|
||||
|
||||
block b2:
|
||||
ret 0:i1
|
||||
|
||||
block b3:
|
||||
ret 0:i1
|
||||
}
|
||||
|
||||
fun i32 @const_prop_switch_default {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
|
||||
block b0:
|
||||
switch 42:i32 default b1() [
|
||||
2:i32 b2()
|
||||
3:i32 b3()
|
||||
]
|
||||
|
||||
block b1:
|
||||
ret 0:i1
|
||||
|
||||
block b2:
|
||||
ret 0:i1
|
||||
|
||||
block b3:
|
||||
ret 0:i1
|
||||
}
|
||||
Reference in New Issue
Block a user