[go/dev.simd] [dev.simd] simd: make "best" instruction choice also depend on commutativity

0 views
Skip to first unread message

David Chase (Gerrit)

unread,
Dec 3, 2025, 2:12:15 PM (12 hours ago) Dec 3
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Junyang Shao, Austin Clements, Go LUCI, golang-co...@googlegroups.com

David Chase submitted the change

Change information

Commit message:
[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-by: Junyang Shao <shaoj...@google.com>
Reviewed-by: Austin Clements <aus...@google.com>
Files:
  • M src/cmd/compile/internal/ssa/_gen/simdAMD64ops.go
  • M src/cmd/compile/internal/ssa/opGen.go
  • M src/cmd/compile/internal/ssa/rewriteAMD64.go
  • M src/simd/_gen/simdgen/gen_simdMachineOps.go
  • M src/simd/_gen/simdgen/gen_utility.go
  • M src/simd/_gen/simdgen/ops/Compares/categories.yaml
  • M src/simd/ops_amd64.go
Change size: XL
Delta: 7 files changed, 642 insertions(+), 728 deletions(-)
Branch: refs/heads/dev.simd
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Austin Clements, +2 by Junyang Shao
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: dev.simd
Gerrit-Change-Id: I83a55fa5ffbd6cbbaf5cb23b3e8a68a5da8aae2f
Gerrit-Change-Number: 726440
Gerrit-PatchSet: 2
Gerrit-Owner: David Chase <drc...@google.com>
Gerrit-Reviewer: Austin Clements <aus...@google.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Junyang Shao <shaoj...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages