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:
@@ -3,7 +3,7 @@ test print-cfg
|
||||
test verifier
|
||||
|
||||
function %nonsense(i32, i32) -> f32 {
|
||||
; check: digraph %nonsense {
|
||||
; check: digraph "%nonsense" {
|
||||
; regex: I=\binst\d+\b
|
||||
; check: label="{ebb0 | <$(BRZ=$I)>brz ebb2 | <$(JUMP=$I)>jump ebb1}"]
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ test print-cfg
|
||||
test verifier
|
||||
|
||||
function %nonsense(i32) {
|
||||
; check: digraph %nonsense {
|
||||
; check: digraph "%nonsense" {
|
||||
|
||||
ebb0(v1: i32):
|
||||
trap user0 ; error: terminator instruction was encountered before the end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
test print-cfg
|
||||
|
||||
function %not_reached(i32) -> i32 {
|
||||
; check: digraph %not_reached {
|
||||
; check: digraph "%not_reached" {
|
||||
; check: ebb0 [shape=record, label="{ebb0 | <inst0>brnz ebb2}"]
|
||||
; check: ebb1 [shape=record, label="{ebb1 | <inst4>jump ebb0}"]
|
||||
; check: ebb2 [shape=record, label="{ebb2}"]
|
||||
|
||||
Reference in New Issue
Block a user