]> git.feebdaed.xyz Git - 0xmirror/go.git/commit
simd/archsimd: delete DotProductQuadruple methods for now
authorCherry Mui <cherryyz@google.com>
Fri, 19 Dec 2025 22:05:03 +0000 (17:05 -0500)
committerCherry Mui <cherryyz@google.com>
Fri, 19 Dec 2025 22:39:35 +0000 (14:39 -0800)
commit70c22e0ad7d89504ab26fb157864f61a79cd4d47
tree9b4c75f54dbb0a1da5c02aca6a4f9029ab9d88c6
parent42cda7c1dfcc1ab109766f2016efe2331b3d0aab
simd/archsimd: delete DotProductQuadruple methods for now

The DotProductQuadruple methods are currently defined on Int8
vectors. There are some problems for that.

1. We defined a DotProductQuadrupleSaturated method, but the dot
product part does not need saturation, as it cannot overflow. It
is the addition part of VPDPBUSDS that does the saturation.
Currently we have optimization rules like

x.DotProductQuadrupleSaturated(y).Add(z) -> VPDPBUSDS

which is incorrect, in that the dot product doesn't do (or need)
saturation, and the Add is a regular Add, but we rewrite it to a
saturated add. The correct rule should be something like

x.DotProductQuadruple(y).AddSaturated(z) -> VPDPBUSDS

2. There are multiple flavors of DotProductQuadruple:
signed/unsigned × signed/unsigned, which cannot be completely
disambiguated by the type. The current naming may preclude adding
all the flavors.

For these reasons, remove the methods for now. We can add them
later with the issues addressed.

Change-Id: I549c0925afaa68c7e2cc956105619f2c1b46b325
Reviewed-on: https://go-review.googlesource.com/c/go/+/731441
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
12 files changed:
src/cmd/compile/internal/amd64/simdssa.go
src/cmd/compile/internal/ssa/_gen/AMD64.rules
src/cmd/compile/internal/ssa/_gen/simdAMD64.rules
src/cmd/compile/internal/ssa/_gen/simdAMD64ops.go
src/cmd/compile/internal/ssa/_gen/simdgenericOps.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
src/cmd/compile/internal/ssagen/simdintrinsics.go
src/simd/archsimd/_gen/simdgen/ops/MLOps/categories.yaml
src/simd/archsimd/_gen/simdgen/ops/MLOps/go.yaml
src/simd/archsimd/internal/simd_test/simd_test.go
src/simd/archsimd/ops_amd64.go