]> git.feebdaed.xyz Git - 0xmirror/go.git/commit
[dev.simd] simd: make "best" instruction choice also depend on commutativity
authorDavid Chase <drchase@google.com>
Wed, 3 Dec 2025 17:49:30 +0000 (12:49 -0500)
committerDavid Chase <drchase@google.com>
Wed, 3 Dec 2025 19:12:10 +0000 (11:12 -0800)
commit608dba4308c75f2fcb4858c0c99275fb5ccb79b5
tree23a1bdebf210502de47e058983202cb771a0e616
parentf3a306527c1ad06965b65f6d6b39b17d2bbcb8ef
[dev.simd] simd: make "best" instruction choice also depend on commutativity

the compare-based-on-immediate instructions are sometimes commutative,
sometimes not.  In this case, that means the instruction cannot be
commutative.

also improve the comments for comparisons.

Change-Id: I83a55fa5ffbd6cbbaf5cb23b3e8a68a5da8aae2f
Reviewed-on: https://go-review.googlesource.com/c/go/+/726440
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/compile/internal/ssa/_gen/simdAMD64ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
src/simd/_gen/simdgen/gen_simdMachineOps.go
src/simd/_gen/simdgen/gen_utility.go
src/simd/_gen/simdgen/ops/Compares/categories.yaml
src/simd/ops_amd64.go