Files
wasmtime/cranelift/filetests/filetests/runtests/bnot.clif
Trevor Elliott 32a7593c94 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>
2022-10-17 16:00:27 -07:00

38 lines
619 B
Plaintext

test interpret
test run
target x86_64
target aarch64
target s390x
function %bnot_i8(i8) -> i8 {
block0(v0: i8):
v1 = bnot.i8 v0
return v1
}
; run: %bnot_i8(0) == -1
; run: %bnot_i8(1) == -2
function %bnot_i16(i16) -> i16 {
block0(v0: i16):
v1 = bnot.i16 v0
return v1
}
; run: %bnot_i16(0) == -1
; run: %bnot_i16(1) == -2
function %bnot_i32(i32) -> i32 {
block0(v0: i32):
v1 = bnot.i32 v0
return v1
}
; run: %bnot_i32(0) == -1
; run: %bnot_i32(1) == -2
function %bnot_i64(i64) -> i64 {
block0(v0: i64):
v1 = bnot.i64 v0
return v1
}
; run: %bnot_i64(0) == -1
; run: %bnot_i64(1) == -2