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

@@ -302,8 +302,7 @@ block0(v0: i128, v1: i128):
function %f10(i128) -> i32 {
block0(v0: i128):
brz v0, block1
jump block2
brif v0, block2, block1
block1:
v1 = iconst.i32 1
@@ -322,22 +321,21 @@ block2:
; cmpq $0, %rsi
; setz %sil
; testb %r9b, %sil
; jnz label1; j label2
; jz label1; j label2
; block1:
; movl $1, %eax
; movl $2, %eax
; movq %rbp, %rsp
; popq %rbp
; ret
; block2:
; movl $2, %eax
; movl $1, %eax
; movq %rbp, %rsp
; popq %rbp
; ret
function %f11(i128) -> i32 {
block0(v0: i128):
brnz v0, block1
jump block2
brif v0, block1, block2
block1:
v1 = iconst.i32 1
@@ -659,8 +657,7 @@ function %f23(i128, i8) -> i128 {
block0(v0: i128, v1: i8):
v2 = iconst.i64 0
v3 = uextend.i128 v2
brnz v1, block1(v3)
jump block2(v3)
brif v1, block1(v3), block2(v3)
block1(v4: i128):
v5 = iconst.i64 1