]> Cypherpunks repositories - gostls13.git/commit
[dev.simd] simd: generalize select-float32-from-pair
authorDavid Chase <drchase@google.com>
Thu, 11 Sep 2025 09:35:35 +0000 (05:35 -0400)
committerDavid Chase <drchase@google.com>
Fri, 26 Sep 2025 17:48:41 +0000 (10:48 -0700)
commitc28b2a0ca19a7de245d3e32b39c8b7562af257d0
treed38a7e3cd18967628af7091aaa5c2fd469b985d0
parenta693ae1e9aebac896f6634583dbdd1cd319f3983
[dev.simd] simd: generalize select-float32-from-pair

This adds methods SelectFromPair for {Int,Uint,Float}32x4
and SelectFromPairGrouped for {Int,Uint,Float}32x8.

Each of these has the signature
```
 func(x T32xK.Method(a,b,c,d uint8, y T32xK) T32xK)
```
where a, b, c, d can be 0-7 and each one specifies an
element from the concatenated elements of x (0-3) and
y (4-7).  When a, b, c, d are constants, 1 or 2
instructions are generated, otherwise, it's done the
harder-slower way with a function call.

Change-Id: I05eb9342e90edb9d83a4d0f5b924bcd2cfd4d12e
Reviewed-on: https://go-review.googlesource.com/c/go/+/703575
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ssa/check.go
src/cmd/compile/internal/ssagen/intrinsics.go
src/simd/internal/simd_test/simd_test.go
src/simd/pkginternal_test.go
src/simd/shuffles_amd64.go