mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.simd] simd, cmd/compile: generated code for VPINSR[BWDQ], and test
This is paired with simdgen CL 683055 Change-Id: I91d2c08a97ddd7cf06dd24478d552b962846131c Reviewed-on: https://go-review.googlesource.com/c/go/+/683035 Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
dd63b7aa0e
commit
1fa4bcfcda
9 changed files with 345 additions and 0 deletions
|
|
@ -230,6 +230,19 @@ func TestSlicesInt8(t *testing.T) {
|
|||
checkInt8Slices(t, a, b)
|
||||
}
|
||||
|
||||
func TestSlicesInt8SetElem(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)
|
||||
|
||||
v = v.SetElem(3, 13)
|
||||
a[3] = 13
|
||||
|
||||
b := make([]int8, 16, 16)
|
||||
v.StoreSlice(b)
|
||||
checkInt8Slices(t, a, b)
|
||||
}
|
||||
|
||||
func TestSlicesInt8TooShortLoad(t *testing.T) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue