Implement a domtree sub-test.
This test verifies the computed dominator tree against annotations. Move the existing testcases into filetests/ with the new syntax.
This commit is contained in:
20
filetests/domtree/loops.cton
Normal file
20
filetests/domtree/loops.cton
Normal file
@@ -0,0 +1,20 @@
|
||||
test domtree
|
||||
|
||||
function test(i32) {
|
||||
ebb0(v0: i32):
|
||||
brz v0, ebb1 ; dominates: ebb1 ebb3 ebb4 ebb5
|
||||
jump ebb2 ; dominates: ebb2
|
||||
ebb1:
|
||||
jump ebb3
|
||||
ebb2:
|
||||
brz v0, ebb4
|
||||
jump ebb5
|
||||
ebb3:
|
||||
jump ebb4
|
||||
ebb4:
|
||||
brz v0, ebb3
|
||||
jump ebb5
|
||||
ebb5:
|
||||
brz v0, ebb4
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user