Add x86 implementation of insertlane instruction
This commit is contained in:
39
cranelift/filetests/filetests/isa/x86/insertlane.clif
Normal file
39
cranelift/filetests/filetests/isa/x86/insertlane.clif
Normal file
@@ -0,0 +1,39 @@
|
||||
test binemit
|
||||
set enable_simd
|
||||
target x86_64 haswell
|
||||
|
||||
function %test_insertlane_b8() {
|
||||
ebb0:
|
||||
[-, %rax] v0 = bconst.b8 true
|
||||
[-, %rbx] v1 = bconst.b8 false
|
||||
[-, %xmm0] v2 = splat.b8x16 v0
|
||||
[-, %xmm0] v3 = insertlane v2, 10, v1 ; bin: 66 0f 3a 20 c3 0a
|
||||
return
|
||||
}
|
||||
|
||||
function %test_insertlane_i16() {
|
||||
ebb0:
|
||||
[-, %rax] v0 = iconst.i16 4
|
||||
[-, %rbx] v1 = iconst.i16 5
|
||||
[-, %xmm1] v2 = splat.i16x8 v0
|
||||
[-, %xmm1] v3 = insertlane v2, 4, v1 ; bin: 66 0f c4 cb 04
|
||||
return
|
||||
}
|
||||
|
||||
function %test_insertlane_i32() {
|
||||
ebb0:
|
||||
[-, %rax] v0 = iconst.i32 42
|
||||
[-, %rbx] v1 = iconst.i32 99
|
||||
[-, %xmm4] v2 = splat.i32x4 v0
|
||||
[-, %xmm4] v3 = insertlane v2, 2, v1 ; bin: 66 0f 3a 22 e3 02
|
||||
return
|
||||
}
|
||||
|
||||
function %test_insertlane_f64() {
|
||||
ebb0:
|
||||
[-, %rax] v0 = f64const 0x0.0
|
||||
[-, %rbx] v1 = f64const 0x4.2
|
||||
[-, %xmm2] v2 = splat.f64x2 v0
|
||||
[-, %xmm2] v3 = insertlane v2, 1, v1 ; bin: 66 48 0f 3a 22 d3 01
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user