cranelift: Remove booleans (#5031)

Remove the boolean types from cranelift, and the associated instructions breduce, bextend, bconst, and bint. Standardize on using 1/0 for the return value from instructions that produce scalar boolean results, and -1/0 for boolean vector elements.

Fixes #3205

Co-authored-by: Afonso Bordado <afonso360@users.noreply.github.com>
Co-authored-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Co-authored-by: Chris Fallin <chris@cfallin.org>
This commit is contained in:
Trevor Elliott
2022-10-17 16:00:27 -07:00
committed by GitHub
parent 766ecb561e
commit 32a7593c94
242 changed files with 7695 additions and 10010 deletions

View File

@@ -737,7 +737,7 @@ block0(v0: i128, v1: i128, v2: i128):
; csdb
; ret
function %g(i8) -> b1 {
function %g(i8) -> i8 {
block0(v0: i8):
v3 = iconst.i8 42
v4 = ifcmp v0, v3
@@ -763,15 +763,14 @@ block0(v0: i8, v1: i8, v2: i8):
; orr w0, w5, w7
; ret
function %i(b1, i8, i8) -> i8 {
block0(v0: b1, v1: i8, v2: i8):
function %i(i8, i8, i8) -> i8 {
block0(v0: i8, v1: i8, v2: i8):
v3 = select.i8 v0, v1, v2
return v3
}
; block0:
; and w5, w0, #1
; subs wzr, w5, wzr
; ands wzr, w0, #255
; csel x0, x1, x2, ne
; ret
@@ -788,15 +787,14 @@ block0(v0: i32, v1: i8, v2: i8):
; csel x0, x1, x2, eq
; ret
function %i128_select(b1, i128, i128) -> i128 {
block0(v0: b1, v1: i128, v2: i128):
function %i128_select(i8, i128, i128) -> i128 {
block0(v0: i8, v1: i128, v2: i128):
v3 = select.i128 v0, v1, v2
return v3
}
; block0:
; and w8, w0, #1
; subs wzr, w8, wzr
; ands wzr, w0, #255
; csel x0, x2, x4, ne
; csel x1, x3, x5, ne
; ret