Commit graph

34 commits

Author SHA1 Message Date
David Chase
e62e377ed6 [dev.simd] cmd/compile, simd: generated code from repaired simdgen sort
generated by simdgen CL 689655
(which names a different CL, because it was submitted before realizing
that git had lost a from a stack, somehow)

Change-Id: Iab2868e848c221de98995ba0c632f97e2ee97670
Reviewed-on: https://go-review.googlesource.com/c/go/+/692336
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-08-01 14:12:56 -07:00
Junyang Shao
6f7a1164e7 [dev.simd] cmd/compile, simd: support store to bits for mask
This CL is partially generated by CL 689775.

Change-Id: I0c36fd2a44706c88db1a1d5ea4a6d0b9f891d85f
Reviewed-on: https://go-review.googlesource.com/c/go/+/689795
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-07-31 15:44:39 -07:00
Junyang Shao
6d10680141 [dev.simd] cmd/compile, simd: add Compress
This CL is generated by CL 687975.

Change-Id: I21707d108773cc6d8e6f07aaed60e756faa1e6cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/687995
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2025-07-15 14:54:17 -07:00
Junyang Shao
01f7f57025 [dev.simd] cmd/compile, simd: add variable Permute
This CL also added some tests for them.

This CL is generated by CL 687919.

Change-Id: I9ddd2cd23bb98ecca91bfbeaffd62faa4bd85e0d
Reviewed-on: https://go-review.googlesource.com/c/go/+/687939
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2025-07-15 14:53:57 -07:00
Junyang Shao
f5f42753ab [dev.simd] cmd/compile, simd: add VDPPS
This CL is generated by CL 687915.

Change-Id: I1a2fb031c086b2b23fd135c48f8494ba5122493a
Reviewed-on: https://go-review.googlesource.com/c/go/+/687916
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
2025-07-14 11:20:47 -07:00
Junyang Shao
b69622b83e [dev.simd] cmd/compile, simd: adjust Shift.* operations
This CL does:
1. Removes ShiftRightSignExtended, default signed vectors to shift
   arithmetic, and unsigned to shift logical.
2. Add the missing Shifts which were left out by YAML error in the
   generator.

This CL is generated by CL 687595.

Change-Id: I663115498adb91c82e89a8476e6748794e997cfa
Reviewed-on: https://go-review.googlesource.com/c/go/+/687596
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-07-11 15:00:44 -07:00
Junyang Shao
aab8b173a9 [dev.simd] cmd/compile, simd: Int64x2 Greater and Uint* Equal
This CL is generated by CL 686817.

Change-Id: I19b8e468594514b2b1c99f8ad766f78b5e194c80
Reviewed-on: https://go-review.googlesource.com/c/go/+/686876
TryBot-Bypass: David Chase <drchase@google.com>
Reviewed-by: David Chase <drchase@google.com>
2025-07-09 11:06:40 -07:00
Junyang Shao
8db7f41674 [dev.simd] cmd/compile: use upper registers for AVX512 simd ops
This CL is generated by CL 686775.

Change-Id: I10606cfdd4be015c8d251ba4275e1191d5bf0944
Reviewed-on: https://go-review.googlesource.com/c/go/+/686695
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-07-09 11:06:34 -07:00
Junyang Shao
5429328b0c [dev.simd] cmd/compile: change register mask names for simd ops
This CL contains codes generated by CL 686556.

Change-Id: I4d7287476b478efdc186a64c12de33528c7fb0af
Reviewed-on: https://go-review.googlesource.com/c/go/+/686476
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-07-09 10:48:04 -07:00
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