Files
wasmtime/cranelift/filetests/filetests/verifier/simd-lane-index.clif
Andrew Brown 7d6e94b952 Replace InsertLane format with TernaryImm8
The InsertLane format has an ordering (`value().imm().value()`) and immediate name (`"lane"`) that make it awkward to use for other instructions. This changes the ordering (`value().value().imm()`) and uses the default name (`"imm"`) throughout the codebase.
2020-05-29 19:56:27 -07:00

42 lines
994 B
Plaintext

test verifier
set enable_simd
target x86_64
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_b16x8() {
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
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_b8x16() {
block0:
v0 = vconst.b8x16 0x00
v1 = extractlane v0, 16 ; error: The lane 16 does not index into the type b8x16
return
}