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>
43 lines
1004 B
Plaintext
43 lines
1004 B
Plaintext
test verifier
|
|
set enable_simd
|
|
target aarch64
|
|
target x86_64 has_sse3 has_ssse3 has_sse41
|
|
|
|
function %insertlane_i32x4() {
|
|
block0:
|
|
v0 = vconst.i32x4 [0 0 0 0]
|
|
v1 = iconst.i32 42
|
|
v2 = insertlane v0, v1, 4 ; error: The lane 4 does not index into the type i32x4
|
|
return
|
|
}
|
|
|
|
function %insertlane_i16x8() {
|
|
block0:
|
|
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
|
|
}
|
|
|
|
function %insertlane_f64x2() {
|
|
block0:
|
|
v0 = vconst.f64x2 0x00
|
|
v1 = f64const 0x0.1
|
|
v2 = insertlane v0, v1, 2 ; error: The lane 2 does not index into the type f64x2
|
|
return
|
|
}
|
|
|
|
function %extractlane_i32x4() {
|
|
block0:
|
|
v0 = vconst.i32x4 [0 0 0 0]
|
|
v1 = extractlane v0, 4 ; error: The lane 4 does not index into the type i32x4
|
|
return
|
|
}
|
|
|
|
function %extractlane_i8x16() {
|
|
block0:
|
|
v0 = vconst.i8x16 0x00
|
|
v1 = extractlane v0, 16 ; error: The lane 16 does not index into the type i8x16
|
|
return
|
|
}
|