Add print-cfg tests
This commit is contained in:
16
tests/cfg/unused_node.cton
Normal file
16
tests/cfg/unused_node.cton
Normal file
@@ -0,0 +1,16 @@
|
||||
; For testing cfg generation where some block is never reached.
|
||||
|
||||
function not_reached(i32) -> i32 {
|
||||
|
||||
ebb0(v0: i32):
|
||||
brnz v0, ebb2 ;;;; ebb0:inst0 -> ebb2
|
||||
trap
|
||||
|
||||
ebb1:
|
||||
v1 = iconst.i32 1
|
||||
v2 = iadd v0, v1
|
||||
jump ebb0(v2) ;;;; ebb1:inst4 -> ebb0
|
||||
|
||||
ebb2:
|
||||
return v0
|
||||
}
|
||||
Reference in New Issue
Block a user