Convert the CFG traversal tests to file tests.

Add a "cfg_postorder:" printout to the "test domtree" file tests and use
that to check the computed CFG post-order instead of doing it manually
with Rust code.
This commit is contained in:
Jakob Stoklund Olesen
2017-12-08 13:54:19 -08:00
parent a7eb13a151
commit 7d5f2f0404
10 changed files with 125 additions and 240 deletions

View File

@@ -29,3 +29,29 @@ function %test(i32) {
ebb9:
return
}
function %test(i32) native {
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
}
; check: cfg_postorder:
; sameln: ebb5
; sameln: ebb3
; sameln: ebb4
; sameln: ebb2
; sameln: ebb1
; sameln: ebb0