Implement the 'test print-cfg' sub-test.

Move the CFG tests into the filetests directory.

Remove the tests directory, there are no more shell-driven tests left.
This commit is contained in:
Jakob Stoklund Olesen
2016-09-15 17:20:39 -07:00
parent 1ed8e1206d
commit 78a2e47d95
8 changed files with 35 additions and 56 deletions

View File

@@ -0,0 +1,20 @@
; For testing cfg generation. This code explores the implications of encountering
; a terminating instruction before any connections have been made.
test print-cfg
function nonsense(i32) {
; check: digraph nonsense {
ebb0(v1: i32):
trap
brnz v1, ebb2 ; unordered: ebb0:inst1 -> ebb2
jump ebb1 ; unordered: ebb0:inst2 -> ebb1
ebb1:
v2 = iconst.i32 0
v3 = iadd v1, v3
jump ebb0(v3) ; unordered: ebb1:inst5 -> ebb0
ebb2:
return v1
}