Files
wasmtime/cranelift/filetests/filetests/cfg/traps_early.clif
Trevor Elliott a5698cedf8 cranelift: Remove brz and brnz (#5630)
Remove the brz and brnz instructions, as their behavior is now redundant with brif.
2023-01-30 20:34:56 +00:00

22 lines
604 B
Plaintext

; For testing cfg generation. This code explores the implications of encountering
; a terminating instruction before any connections have been made.
test print-cfg
test verifier
function %nonsense(i32) {
; check: digraph "%nonsense" {
block0(v1: i32):
trap user0 ; error: terminator instruction was encountered before the end
brif v1, block2, block1 ; unordered: block0:inst1 -> block2
; unordered: block0:inst1 -> block1
block1:
v2 = iconst.i32 0
v3 = iadd v1, v3
jump block0(v3) ; unordered: block1:inst4 -> block0
block2:
return v1
}