- Allow bitcast for vectors with differing lane widths - Remove raw_bitcast IR instruction - Change all users of raw_bitcast to bitcast - Implement support for no-op bitcast cases across backends This implements the second step of the plan outlined here: https://github.com/bytecodealliance/wasmtime/issues/4566#issuecomment-1234819394
43 lines
815 B
Plaintext
43 lines
815 B
Plaintext
; Tests for platforms with 64-bit references.
|
|
test run
|
|
target aarch64
|
|
target x86_64
|
|
target s390x
|
|
|
|
function %is_null_true_r64() -> i8 {
|
|
block0:
|
|
v0 = null.r64
|
|
v1 = is_null v0
|
|
return v1
|
|
}
|
|
; run: %is_null_true_r64() == 1
|
|
|
|
function %is_null_r64(i64) -> i8 {
|
|
block0(v0: i64):
|
|
v1 = bitcast.r64 v0
|
|
v2 = is_null v1
|
|
return v2
|
|
}
|
|
; run: %is_null_r64(256347) == 0
|
|
; run: %is_null_r64(-1) == 0
|
|
; run: %is_null_r64(0) == 1
|
|
|
|
function %is_invalid_r64(i64) -> i8 {
|
|
block0(v0: i64):
|
|
v1 = bitcast.r64 v0
|
|
v2 = is_invalid v1
|
|
return v2
|
|
}
|
|
; run: %is_invalid_r64(0xffffffffffffffff) == 1
|
|
; run: %is_invalid_r64(-1) == 1
|
|
; run: %is_invalid_r64(256347) == 0
|
|
; run: %is_invalid_r64(0) == 0
|
|
|
|
function %is_invalid_null_r64() -> i8 {
|
|
block0:
|
|
v0 = null.r64
|
|
v1 = is_invalid v0
|
|
return v1
|
|
}
|
|
; run: %is_invalid_null_r64() == 0
|