Add print-cfg tests

This commit is contained in:
Morgan Phillips
2016-07-14 13:43:11 -07:00
parent 0cdcf29308
commit 5bcce51bd9
6 changed files with 118 additions and 1 deletions

View File

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