[dev.simd] simd, cmd/compile: generated code for Broadcast

Generated by simdgen CL 693599

This turned out to require some additional work in
other places, including filling in missing
methods (use OverwriteBase to get FP versions).

Also includes a test.

Change-Id: I2efe8967837834745f9cae661d4d4dcbb5390b6f
Reviewed-on: https://go-review.googlesource.com/c/go/+/693758
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
This commit is contained in:
David Chase 2025-08-05 17:34:05 -04:00
parent e001300cf2
commit ddb689c7bb
11 changed files with 2597 additions and 60 deletions

View file

@ -412,3 +412,15 @@ func TestRotateAllVariable(t *testing.T) {
}
}
}
func TestBroadcastUint32x4(t *testing.T) {
s := make([]uint32, 4, 4)
simd.BroadcastUint32x4(123456789).StoreSlice(s)
checkSlices(t, s, []uint32{123456789, 123456789, 123456789, 123456789})
}
func TestBroadcastFloat32x8(t *testing.T) {
s := make([]float32, 8, 8)
simd.BroadcastFloat32x8(123456789).StoreSlice(s)
checkSlices(t, s, []float32{123456789, 123456789, 123456789, 123456789, 123456789, 123456789, 123456789, 123456789})
}