mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.simd] cmd/compile: add INSERT[IF]128 instructions
This CL is created by simdgen CL 684055 and should be submitted after it. Also includes a test. Change-Id: I2ad7ae51d11cfc19745e866150e2eaf010d4ea49 Reviewed-on: https://go-review.googlesource.com/c/go/+/684077 Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
d8fa853b37
commit
292db9b676
10 changed files with 375 additions and 0 deletions
|
|
@ -193,6 +193,22 @@ func TestSlicesInt8GetElem(t *testing.T) {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
func TestSlicesInt8Set128(t *testing.T) {
|
||||
a := []int8{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
|
||||
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}
|
||||
v := simd.LoadInt8x16Slice(a) // 1-16
|
||||
u := simd.LoadInt8x32Slice(a) // 1-32
|
||||
|
||||
w := u.Set128(1, v) // 1-16:1-16
|
||||
|
||||
b := make([]int8, 32, 32)
|
||||
w.StoreSlice(b)
|
||||
|
||||
checkInt8Slices(t, a, b[:16])
|
||||
checkInt8Slices(t, a, b[16:])
|
||||
}
|
||||
|
||||
func TestSlicesInt8TooShortLoad(t *testing.T) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue