[dev.simd] cmd/compile, simd: add Compress

This CL is generated by CL 687975.

Change-Id: I21707d108773cc6d8e6f07aaed60e756faa1e6cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/687995
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Junyang Shao 2025-07-14 20:29:46 +00:00
parent 17baae72db
commit 6d10680141
10 changed files with 2177 additions and 221 deletions

View file

@ -186,6 +186,16 @@ func TestPermute2(t *testing.T) {
}
}
func TestCompress(t *testing.T) {
if !simd.HasAVX512() {
t.Skip("Test requires HasAVX512, not available on this hardware")
return
}
testInt32x4Mask32x4Int32x4(t, []int32{1, 2, 3, 4},
[]int32{0, -1, 0, -1},
[]int32{2, 4, 0, 0}, "Compress")
}
// checkInt8Slices ensures that b and a are equal, to the end of b.
// also serves to use the slices, to prevent accidental optimization.
func checkInt8Slices(t *testing.T, a, b []int8) {