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>
59 lines
1.0 KiB
Plaintext
59 lines
1.0 KiB
Plaintext
test interpret
|
|
test run
|
|
target aarch64
|
|
; s390x and x86_64 do not support 64-bit vectors.
|
|
|
|
function %vanytrue_i8x8_f() -> i8 {
|
|
block0:
|
|
v0 = iconst.i8 0
|
|
v1 = splat.i8x8 v0
|
|
v2 = vany_true v1
|
|
return v2
|
|
}
|
|
; run: %vanytrue_i8x8_f() == 0
|
|
|
|
function %vanytrue_i8x8_t() -> i8 {
|
|
block0:
|
|
v0 = iconst.i8 -1
|
|
v1 = splat.i8x8 v0
|
|
v2 = vany_true v1
|
|
return v2
|
|
}
|
|
; run: %vanytrue_i8x8_t() == 1
|
|
|
|
function %vanytrue_i16x4_f() -> i8 {
|
|
block0:
|
|
v0 = iconst.i16 0
|
|
v1 = splat.i16x4 v0
|
|
v2 = vany_true v1
|
|
return v2
|
|
}
|
|
; run: %vanytrue_i16x4_f() == 0
|
|
|
|
function %vanytrue_i16x4_t() -> i8 {
|
|
block0:
|
|
v0 = iconst.i16 -1
|
|
v1 = splat.i16x4 v0
|
|
v2 = vany_true v1
|
|
return v2
|
|
}
|
|
; run: %vanytrue_i16x4_t() == 1
|
|
|
|
function %vanytrue_i32x2_f() -> i8 {
|
|
block0:
|
|
v0 = iconst.i32 0
|
|
v1 = splat.i32x2 v0
|
|
v2 = vany_true v1
|
|
return v2
|
|
}
|
|
; run: %vanytrue_i32x2_f() == 0
|
|
|
|
function %vanytrue_i32x2_t() -> i8 {
|
|
block0:
|
|
v0 = iconst.i32 -1
|
|
v1 = splat.i32x2 v0
|
|
v2 = vany_true v1
|
|
return v2
|
|
}
|
|
; run: %vanytrue_i32x2_t() == 1
|