cranelift: Remove brz and brnz (#5630)

Remove the brz and brnz instructions, as their behavior is now redundant with brif.
This commit is contained in:
Trevor Elliott
2023-01-30 12:34:56 -08:00
committed by GitHub
parent 77cf547f41
commit a5698cedf8
247 changed files with 2947 additions and 3754 deletions

View File

@@ -8,7 +8,7 @@ function %test_1(i32) {
function %test_2(i32) {
block0(v0: i32):
jump block2 ; error: a terminator instruction was encountered before the end of block0
brz v0, block3
brif v0, block2, block3
block2:
jump block3
block3:

View File

@@ -91,9 +91,8 @@ function %jump_args2() {
block0:
v0 = iconst.i16 10
v3 = iconst.i64 20
brz v0, block1(v0, v3) ; error: arg 0 (v0) has type i16, expected i64
; error: arg 1 (v3) has type i64, expected i16
jump block1(v3, v0)
brif v0, block1(v3, v0), block1(v0, v3) ; error: arg 0 (v0) has type i16, expected i64
; error: arg 1 (v3) has type i64, expected i16
block1(v10: i64, v11: i16):
return
}