Commit graph

25 commits

Author SHA1 Message Date
Junyang Shao
029d7ec3e9 [dev.simd] cmd/compile, simd: rename Masked$OP to $(OP)Masked.
This CL is generated by CL 686575.

Change-Id: I1483189a1ae9bed51446fd69daab3f7b128549ae
Reviewed-on: https://go-review.googlesource.com/c/go/+/686516
Reviewed-by: David Chase <drchase@google.com>
TryBot-Bypass: David Chase <drchase@google.com>
2025-07-09 10:18:01 -07:00
Junyang Shao
56ca67682b [dev.simd] cmd/compile, simd: remove FP bitwise logic operations.
This CL is generated by CL 686555.

Change-Id: I0efb86a919692cd97c1c5b6365d77361a30bf7cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/686496
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2025-07-08 14:01:22 -07:00
David Chase
43a61aef56 [dev.simd] cmd/compile: add EXTRACT[IF]128 instructions
This is generated by simdgen CL 684080
and should be submitted after it.

Also includes tests.

Change-Id: I1d680911134d8fb92f4deccae4ec373f3ed9f752
Reviewed-on: https://go-review.googlesource.com/c/go/+/684115
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-07-07 18:37:28 -07:00
David Chase
292db9b676 [dev.simd] cmd/compile: add INSERT[IF]128 instructions
This CL is created by simdgen CL 684055 and
should be submitted after it.

Also includes a test.

Change-Id: I2ad7ae51d11cfc19745e866150e2eaf010d4ea49
Reviewed-on: https://go-review.googlesource.com/c/go/+/684077
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-07-07 16:52:36 -07:00
Junyang Shao
10c9621936 [dev.simd] cmd/compile, simd: add galois field operations
This CL is generated by CL 684275.

Change-Id: Ie1efd0979af0ef0a56781bf9013071bf4d2c52c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/684175
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-06-26 20:59:45 -07:00
Junyang Shao
e61ebfce56 [dev.simd] cmd/compile, simd: add shift operations
This CL is generated by CL 683475.

Change-Id: I9e3ac6aff6f711cb26ff85e4c8729d9e2cc38e7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/683715
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2025-06-26 20:59:39 -07:00
David Chase
7fadfa9638 [dev.simd] cmd/compile: add simd VPEXTRA*
This CL is generated by simdgen CL 683836
and this CL should be submitted after its
generator.

Change-Id: I1aa893b185826ad1f9fb60b85c75eda31f70623b
Reviewed-on: https://go-review.googlesource.com/c/go/+/683797
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-06-26 13:34:29 -07:00
David Chase
0d8cb89f5c [dev.simd] cmd/compile: support simd(imm,fp) returns gp
These changes are required to make gp-returning simd
ops work.  amd64/ssa.go includes a new code generator
helper, gc/main.go initializes intrinsics AFTER
the types, ssa/_gen/*AMD64.go add another register
shape to the simd ops function.

This CL should be submitted after simdgen CL 683858
which generated some of the changes.

Change-Id: I0af752ba8882fa131b875ff9c741ef70afbc60d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/683816
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
2025-06-26 05:22:45 -07:00
David Chase
e32488003d [dev.simd] cmd/compile: make simd regmask naming more like existing conventions
Paired with simdgen CL 682937

Change-Id: Ia826f643ece23bf4c7903dffe2fc15e39fbd5577
Reviewed-on: https://go-review.googlesource.com/c/go/+/683115
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-06-23 10:57:49 -07:00
David Chase
1fa4bcfcda [dev.simd] simd, cmd/compile: generated code for VPINSR[BWDQ], and test
This is paired with simdgen CL 683055

Change-Id: I91d2c08a97ddd7cf06dd24478d552b962846131c
Reviewed-on: https://go-review.googlesource.com/c/go/+/683035
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-06-23 10:24:57 -07:00
David Chase
1b87d52549 [dev.simd] cmd/compile: add fp1gp1fp1 register mask for AMD64
This is paired with a matching simdgen CL 682679

Change-Id: Id494d40b5e64b723a47c1682b71e523a77b0eb87
Reviewed-on: https://go-review.googlesource.com/c/go/+/682656
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-06-18 13:55:07 -07:00
Junyang Shao
1313521f75 [dev.simd] cmd/compile: remove fused mul/add/sub shapes.
This CL only keeps one shape of those fused mul/add/sub operations. The
rest of the instructions will be generated during lowering as an
optimization.

This CL is generated by CL 682436.

Change-Id: Iadee1786185289838e04f3aa8f333844cfacc02e
Reviewed-on: https://go-review.googlesource.com/c/go/+/682435
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2025-06-18 12:22:24 -07:00
Junyang Shao
1be5eb2686 [dev.simd] cmd/compile: fix signature error of PairDotProdAccumulate.
This CL is generated by CL 682135.

Change-Id: I6f004b2eca6323f1ff22555c85db993386f24c6c
Reviewed-on: https://go-review.googlesource.com/c/go/+/682155
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2025-06-17 19:03:27 -07:00
Junyang Shao
ee1d9f3f85 [dev.simd] cmd/compile: reorder stubs
This CL is generated by CL 682035.

Change-Id: I0a8b7382470afb5a6571ab7d4abe038de0ff239e
Reviewed-on: https://go-review.googlesource.com/c/go/+/682055
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
2025-06-16 13:45:27 -07:00
David Chase
7392dfd43e [dev.simd] cmd/compile: generated simd*ops files weren't up to date
I re-ran the generator in arch/internal/simd to
verify a clean move of the intrinsics helpers, and
these changes (which look correct) appeared.

Change-Id: I28a0e8bd144d47aec216f557f238362f238d0428
Reviewed-on: https://go-review.googlesource.com/c/go/+/681499
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
2025-06-13 14:26:44 -07:00
Junyang Shao
ca01eab9c7 [dev.simd] cmd/compile: add fused mul add sub ops
This CL is generated by CL 680595.

Change-Id: I5e06ea9bc6a62593fc3b00fd44c119a5ed0d9e90
Reviewed-on: https://go-review.googlesource.com/c/go/+/681299
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-06-13 12:15:29 -07:00
Junyang Shao
ded6e0ac71 [dev.simd] cmd/compile: add more dot products
This CL is generated by CL 680215.

Change-Id: Ie085e65e0473a8e96170702d7265d379ec8812ba
Reviewed-on: https://go-review.googlesource.com/c/go/+/681298
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-06-13 12:15:18 -07:00
Junyang Shao
9ba7db36b5 [dev.simd] cmd/compile: add dot product ops
This CL is generated by CL 678515.

Change-Id: Iac7c424bbbffc2514dff3495d6c408fa9c998c2f
Reviewed-on: https://go-review.googlesource.com/c/go/+/681296
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-06-13 11:43:59 -07:00
Junyang Shao
34a9cdef87 [dev.simd] cmd/compile: add round simd ops
This CL is generated by CL 678195.

Change-Id: Ica600229a4e9623fa45f3b5aa370cdd6d9c31686
Reviewed-on: https://go-review.googlesource.com/c/go/+/681295
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2025-06-13 11:43:48 -07:00
Junyang Shao
5289e0f24e [dev.simd] cmd/compile: updates simd ordering and docs
This CL is generated by CL 681395.

Change-Id: Ic930aeeb24fc7f95a4d74c77403532d0b0eb39ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/681215
Auto-Submit: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-06-13 08:02:19 -07:00
Junyang Shao
884f646966 [dev.simd] cmd/compile: add fp3m1fp1 shape to regalloc
Change-Id: Ie89cf521f5ae59de1934f6f49bb5fd3f63cc5883
Reviewed-on: https://go-review.googlesource.com/c/go/+/680236
Auto-Submit: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2025-06-09 13:44:37 -07:00
Junyang Shao
6bc3505773 [dev.simd] cmd/compile: add fp3fp1 regsiter shape
This is to accomodate dot product instructions.

Change-Id: I88b21f848d7a51ad036bb3555c30f12b72571b2b
Reviewed-on: https://go-review.googlesource.com/c/go/+/680235
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
2025-06-09 11:27:09 -07:00
Junyang Shao
8ecbd59ebb [dev.simd] cmd/compile: generated codes for amd64 SIMD
This CL is generated by tool in CL 667155.

Change-Id: I3829d0d2c96fe7000e2dd025a3006f96957d777a
Reviewed-on: https://go-review.googlesource.com/c/go/+/675618
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-06-05 11:09:40 -07:00
Junyang Shao
1161228bf1 [dev.simd] cmd/compile: add a fp1m1fp1 register shape to amd64
Change-Id: I9dd00cc8bef4712eff16968e4962d850859fc3f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/676997
Commit-Queue: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2025-05-29 08:34:01 -07:00
David Chase
04b1030ae4 [dev.simd] cmd/compile: adapters for simd
This combines several CLs into a single patch of "glue"
for the generated SIMD extensions.

This glue includes GOEXPERIMENT checks that disable
the creation of user-visible "simd" types and
that disable the registration of "simd" intrinsics.

The simd type checks were changed to work for either
package "simd" or "internal/simd" so that moving that
package won't be quite so fragile.

cmd/compile, internal/simd: glue for adding SIMD extensions to Go
cmd/compile: theft of Cherry's sample SIMD compilation

Change-Id: Id44e2f4bafe74032c26de576a8691b6f7d977e01
Reviewed-on: https://go-review.googlesource.com/c/go/+/675598
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
2025-05-28 08:46:30 -07:00