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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user