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

@@ -11,11 +11,11 @@ block0:
return
}
function %insertlane_b16x8() {
function %insertlane_i16x8() {
block0:
v0 = vconst.b16x8 [false false false false false false false false]
v1 = bconst.b16 true
v2 = insertlane v0, v1, 8 ; error: The lane 8 does not index into the type b16x8
v0 = vconst.i16x8 [0 0 0 0 0 0 0 0]
v1 = iconst.i16 -1
v2 = insertlane v0, v1, 8 ; error: The lane 8 does not index into the type i16x8
return
}
@@ -34,9 +34,9 @@ block0:
return
}
function %extractlane_b8x16() {
function %extractlane_i8x16() {
block0:
v0 = vconst.b8x16 0x00
v1 = extractlane v0, 16 ; error: The lane 16 does not index into the type b8x16
v0 = vconst.i8x16 0x00
v1 = extractlane v0, 16 ; error: The lane 16 does not index into the type i8x16
return
}

View File

@@ -10,9 +10,9 @@ function %entry_block_arg_type(i32) {
return
}
function %incorrect_arg_type(i32, b1) -> i32 {
block0(v0: i32, v1: b1):
v2 = iadd v0, v1 ; error: arg 1 (v1) has type b1, expected i32
function %incorrect_arg_type(i32, i8) -> i32 {
block0(v0: i32, v1: i8):
v2 = iadd v0, v1 ; error: arg 1 (v1) has type i8, expected i32
return v2
}