aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/opGen.go
AgeCommit message (Collapse)Author
2026-01-28cmd/compile, simd: capture VAES instructions and fix AVX512VAES featureJunyang Shao
The code previously filters out VAES-only instructions, this CL added them back. This CL added the VAES feature check following the Intel xed data: XED_ISA_SET_VAES: vaes.7.0.ecx.9 # avx.1.0.ecx.28 This CL also found out that the old AVX512VAES feature check is not checking the correct bits, it also fixes it: XED_ISA_SET_AVX512_VAES_128: vaes.7.0.ecx.9 aes.1.0.ecx.25 avx512f.7.0.ebx.16 avx512vl.7.0.ebx.31 XED_ISA_SET_AVX512_VAES_256: vaes.7.0.ecx.9 aes.1.0.ecx.25 avx512f.7.0.ebx.16 avx512vl.7.0.ebx.31 XED_ISA_SET_AVX512_VAES_512: vaes.7.0.ecx.9 aes.1.0.ecx.25 avx512f.7.0.ebx.16 It restricts to the most strict common set - includes avx512vl for even 512-bits although it doesn't requires it. Change-Id: I4e2f72b312fd2411589fbc12f9ee5c63c09c2e9a Reviewed-on: https://go-review.googlesource.com/c/go/+/738500 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-01-28cmd/compile: (loong64) optimize float32(abs|sqrt64(float64(x)))Xiaolin Zhao
Ref: #733621 Updates #75463 Change-Id: Idd8821d1713754097a2fe83a050c25d9ec5b17eb Reviewed-on: https://go-review.googlesource.com/c/go/+/735540 Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2026-01-28cmd/compile: remove the NORconst op on mips{,64}Xiaolin Zhao
In the mips{,64} instruction sets and their extensions, there is no NORI instruction. Change-Id: If008442c792297d011b3d0c1e8501e62e32ab175 Reviewed-on: https://go-review.googlesource.com/c/go/+/735900 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: Cherry Mui <cherryyz@google.com>
2026-01-27cmd/compile, runtime: avoid improper control transfer instruction hints on ↵wangboyao
riscv64 On RISC-V the JAL and JALR instructions provide Return Address Stack(RAS) prediction hints based on the registers used (as per section 2.5.1 of the RISC-V ISA manual). When a JALR instruction uses X1 or X5 as the source register, it hints that a pop should occur. When making a function call, avoid the use of X5 as a source register since this results in the RAS performing a pop-then-push instead of a push, breaking call/return pairing and significantly degrading front-end branch prediction performance. Based on test result of golang.org/x/benchmarks/json on SpacemiT K1, fix version has a performance improvement of about 7% Fixes #76654 Change-Id: I867c8d7cfb54f5decbe176f3ab3bb3d78af1cf64 Reviewed-on: https://go-review.googlesource.com/c/go/+/726760 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Joel Sing <joel@sing.id.au> Run-TryBot: Joel Sing <joel@sing.id.au>
2026-01-13simd/archsimd: 128- and 256-bit FMA operations do not require AVX-512Austin Clements
Currently, all FMA operations are marked as requiring AVX512, even on smaller vector widths. This is happening because the narrower FMA operations are marked as extension "FMA" in the XED. Since this extension doesn't start with "AVX", we filter them out very early in the XED process. However, this is just a quirk of naming: the FMA feature depends on the AVX feature, so it is part of AVX, even if it doesn't say so on the tin. Fix this by accepting the FMA extension and adding FMA to the table of CPU features. We also tweak internal/cpu slightly do it correctly enforces that the logical FMA feature depends on both the FMA and AVX CPUID flags. This actually *deletes* a lot of generated code because we no longer need the AVX-512 encoding of these 128- and 256-bit operations. Change-Id: I744a18d0be888f536ac034fe88b110347622be7e Reviewed-on: https://go-review.googlesource.com/c/go/+/736160 Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/736201 Reviewed-by: Austin Clements <austin@google.com>
2026-01-08simd/archsimd: rename Broadcast methodsCherry Mui
Currently the Broadcast128/256/512 methods broadcast the lowest element of the input vector to a vector of the corresponding width. There are also variations of broadcast operations that broadcast the whole (128- or 256-bit) vector to a larger vector, which we don't yet support. Our current naming is unclear which version it is, though. Rename the current ones to Broadcast1ToN, to be clear that they broadcast one element. The vector version probably will be named BoradcastAllToN (not included in this CL). Change-Id: I47a21e367f948ec0b578d63706a40d20f5a9f46d Reviewed-on: https://go-review.googlesource.com/c/go/+/734840 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
2026-01-05simd/archsimd: use V(P)MOVMSK for mask ToBits if possibleCherry Mui
VPMOVMSKB, VMOVMSKPS, and VMOVMSKPD moves AVX1/2-style masks to integer registers, similar to VPMOV[BWDQ]2M (which moves to mask registers). The former is available on AVX1/2, the latter requires AVX512. So use the former if it is supported, i.e. for 128- and 256-bit vectors with 8-, 32-, and 64-bit elements (16-bit elements always require AVX512). Change-Id: I972195116617ed2faaf95cee5cd6b250e671496c Reviewed-on: https://go-review.googlesource.com/c/go/+/734060 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
2026-01-02simd/archsimd: make IsNaN unaryCherry Mui
Currently, the IsNan API is defined as x.IsNan(y), which returns a mask to represent, for each element, either x or y is NaN. Albeit closer to the machine instruction, this is weird API, as IsNaN is a unary operation. This CL changes it to unary, x.IsNaN(). It compiles to VCMPPS $3, x, x (or VCMPPD). For the two-operand version, we can optimize x.IsNaN().Or(y.IsNaN()) to VCMPPS $3, x, y (not done in this CL). While here, change the name to IsNaN (uppercase both Ns), which matches math.IsNaN. Tests in the next CL. Change-Id: Ib6e7afc2635e6c3c606db5ea16420ee673a6c6d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/733660 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-12-29simd/archsimd: remove redundant suffix of ExtendLo operationsCherry Mui
For methods like ExtendLo2ToInt64x2, the last "x2" is redundant, as it is already mentioned in "Lo2". Remove it, so it is just ExtendLo2ToInt64. Change-Id: I490afd818c40bb7a4ef15c249723895735bd6488 Reviewed-on: https://go-review.googlesource.com/c/go/+/733100 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-12-22simd/archsimd: correct documentation for pairwise operationsCherry Mui
For Add/SubPairs(Saturated?), the documented result element order is wrong. Corrected. Also, for 256-bit vectors, this is a grouped operation. So name it with the Grouped suffix to be clear. Change-Id: Idfd0975cb4a332b2e28c898613861205d26f75b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/732020 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-12-19simd/archsimd: delete DotProductQuadruple methods for nowCherry Mui
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>
2025-12-19simd/archsimd: add Grouped for 256- and 512-bit SaturateTo(U)Int16Concat, ↵Cherry Mui
and fix type They operate on 128-bit groups, so name them Grouped to be clear, and consistent with other grouped operations. Reword the documentation, mention the grouping only for grouped versions. Also, SaturateToUnt16Concat(Grouped) is a signed int32 to unsigned uint16 saturated conversion. The receiver and the parameter should be signed. The result remains unsigned. Change-Id: I30e28bc05e07f5c28214c9c6d9d201cbbb183468 Reviewed-on: https://go-review.googlesource.com/c/go/+/731501 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-12-19simd/archsimd: correct type and instruction for SaturateToUint8Cherry Mui
It should be defined on unsigned types, not signed types, and use unsigned conversion instructions. Change-Id: I49694ccdf1d331cfde88591531c358d9886e83e6 Reviewed-on: https://go-review.googlesource.com/c/go/+/731500 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-12-08[dev.simd] cmd/compile: zero only low 128-bit of X15Cherry Mui
Zeroing the upper part of X15 may make the CPU think it is "dirty" and slow down SSE operations. For now, just not zeroing the upper part, and construct a zero value on the fly if we need a 256- or 512-bit zero value. Maybe VZEROUPPER works better than explicitly zeroing X15, but we need to evaluate. Long term, we probably want to move more things from SSE to AVX. This essentially undoes CL 698237 and CL 698238, except keeping using X15 for 128-bit zeroing for SIMD. Change-Id: I1564e6332c4c57f9721397c92c7c734c5497534c Reviewed-on: https://go-review.googlesource.com/c/go/+/728240 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-12-08[dev.simd] simd: add carryless multiplyDavid Chase
now with comments, and also a test. choice of data types, method names, etc, are all up for comment. It's NOT commutative, because of the immediate operand (unless we swap the bits of the immediate). Change-Id: I730a6938c6803d0b93544445db65eadc51783e42 Reviewed-on: https://go-review.googlesource.com/c/go/+/726963 Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-12-03[dev.simd] all: merge master (5945fc0) into dev.simdDavid Chase
Merge List: + 2025-12-03 5945fc02fc doc/next: delete + 2025-12-03 dcc5fe0c62 api: promote next to go1.26 + 2025-12-03 7991da1161 crypto/hpke: remove unused hybridKEM field + 2025-12-03 2729e87aa5 doc/next: pluralize 'result' + 2025-12-03 6e72f526cd doc/next/6-stdlib/99-minor/go/ast/76031.md: add BasicLit caveat + 2025-12-03 fa30b68767 go/{ast,doc}: update BasicLit.ValueEnd as well as ValuePos + 2025-12-03 32a9804c7b cmd/link: don't update offset of existing ELF section name + 2025-12-02 509ddf3868 cmd/compile: ensure bloop only kept alive addressable nodes + 2025-12-02 7cab1b1b26 doc: pre-announce removal of gotypesalias and asynctimerchan GODEBUG flags + 2025-12-02 1a64db3a4b spec: remove restriction on channel element types for close built-in (bug fix) + 2025-12-02 2e06fa6b68 doc/next: release note for scheduler metrics + 2025-12-02 77c795011b doc/next: document cgo call overhead improvement + 2025-12-02 6e4abe8cef doc: mention stack allocation of slices + 2025-12-02 88c24de8b5 doc/next: add section for Green Tea + 2025-12-02 043b9de658 net: parse addresses without separators in ParseMac + 2025-12-02 e432b4f3a1 cmd/compile: more generated equality function tests + 2025-12-02 c1acdcb345 crypto/x509: prevent HostnameError.Error() from consuming excessive resource + 2025-12-02 8ae5d408ed spec: more precise prose for built-in function new + 2025-12-02 c5c05a0e43 cmd/go: add test checking version with experiment is valid + 2025-12-01 f22d37d574 runtime/internal/testprog: log initial SchedMetrics GOMAXPROCS + 2025-12-01 8b5db48db1 net/http: deflake TestClientConnReserveAndConsume + 2025-12-01 94616dad42 internal/runtime/cgroup: remove duplicate readString definition + 2025-12-01 67851547d8 internal/runtime/cgroup: lineReader fuzz test + 2025-12-01 ac3e0ae51a doc: document go tool pprof -http default change + 2025-12-01 42e03bbd27 debug/elf: correct case of DWARF in comment + 2025-12-01 18015e8c36 doc/next: clean up some Go 1.26 release notes + 2025-12-01 4be545115c cmd/pprof: update vendored github.com/google/pprof + 2025-12-01 16c0f7e152 cmd/compile: run go generate for internal/ir + 2025-12-01 dc913c316a all: update vendored dependencies + 2025-12-01 1555fad47d vendor/golang.org/x/tools: update to 1ad6f3d + 2025-12-01 eec1afeb28 debug/elf: make check for empty symbol section consistent for 64-bit and 32-bit binaries + 2025-11-28 3f94f3d4b2 test/codegen: fix shift tests on riscv64 + 2025-11-28 2ac1f9cbc3 cmd/compile: avoid unnecessary interface conversion in bloop + 2025-11-28 de456450e7 runtime/secret: disable tests under memory validating modes + 2025-11-27 67d4a28707 fmt: document space behavior of Append + 2025-11-27 c079dd13c0 runtime/secret: reorganize tests to fix -buildmode=shared + 2025-11-27 2947cb0469 runtime/_mkmalloc: fix log.Fatal formatting directive + 2025-11-26 cead111a77 internal/runtime/cgroup: stricter unescapePath + 2025-11-26 c2af9f14b4 internal/runtime/cgroup: fix path on non-root mount point + 2025-11-26 6be5de4bc4 internal/runtime/cgroup: simplify escapePath in test + 2025-11-26 481c6df7b9 io: reduce intermediate allocations in ReadAll and have a smaller final result + 2025-11-26 cec4d4303f os: allow direntries to have zero inodes on Linux + 2025-11-26 f1bbc66a10 cmd/link: test that moduledata is in its own section + 2025-11-26 003f52407a cmd/link: test that findfunctab is in gopclntab section + 2025-11-26 21b6ab57d5 cmd/link: test that funcdata values are in gopclntab section + 2025-11-26 c03e25a263 cmd/link: always run current linker in tests + 2025-11-26 9f5cd43fe6 cmd/link: put moduledata in its own .go.module section + 2025-11-26 43cfd785e7 cmd/link, runtime, debug/gosym: move pclntab magic to internal/abi + 2025-11-26 312b2034a4 cmd/link: put runtime.findfunctab in the .gopclntab section + 2025-11-26 b437d5bf36 cmd/link: put funcdata symbols in .gopclntab section + 2025-11-26 4bc3410b6c cmd/link: build shstrtab from ELF sections + 2025-11-26 b0c278be40 cmd/link: use shdr as a slice rather than counting in elfhdr.Shnum + 2025-11-26 0ff323143d cmd/link: sort allocated ELF section headers by address + 2025-11-26 4879151d1d cmd/compile: introduce alias analysis and automatically free non-aliased memory after growslice + 2025-11-26 d8269ab0d5 cmd/link, cmd/internal/obj: fix a remote call failure issue + 2025-11-26 c6d64f8556 cmd/internal/obj/loong64: remove the incorrect unsigned instructions + 2025-11-26 c048a9a11f go/types, types2: remove InvalidTypeCycle from literals.go + 2025-11-26 ff2fd6327e go/types, types2: remove setDefType and most def plumbing + 2025-11-26 3531ac23d4 go/types, types2: replace setDefType with pending type check + 2025-11-26 2b8dbb35b0 crypto,testing/cryptotest: ignore random io.Reader params, add SetGlobalRandom + 2025-11-26 21ebed0ac0 runtime: update mkmalloc to make generated code look nicer + 2025-11-26 a3fb92a710 runtime/secret: implement new secret package + 2025-11-26 0c747b7aa7 go/build/constraint: use strings.Builder instead of for { str+=str } + 2025-11-26 0f6397384b go/types: relax NewSignatureType for append(slice, str...) + 2025-11-26 992ad55e3d crypto/tls: support crypto.MessageSigner private keys + 2025-11-26 3fd9cb1895 cmd/compile: fix bloop get name logic + 2025-11-26 3353c100bb cmd/go: remove experiment checks for compile -c + 2025-11-26 301d9f9b52 doc/next: document broken freebsd/riscv64 port + 2025-11-26 de39282332 cmd/compile, runtime: guard X15 zeroing with GOEXPERIMENT=simd + 2025-11-26 86bbea0cfa crypto/fips140: add WithoutEnforcement + 2025-11-26 e2cae9ecdf crypto/x509: add ExtKeyUsage.OID method + 2025-11-26 623ef28135 cmd/go: limit total compile -c backend concurrency using a pool + 2025-11-26 3c6bf6fbf3 cmd/compile: handle loops better during stack allocation of slices + 2025-11-26 efe9ad501d go/types, types2: improve printing of []*operand lists (debugging support) + 2025-11-26 ac3369242d runtime: merge all the linux 32 and 64 bits files into one for each + 2025-11-26 fb5156a098 testing: fix bloop doc + 2025-11-26 b194f5d24a os,internal/syscall/windows: support O_* flags in Root.OpenFile + 2025-11-26 e0a4dffb0c cmd/internal/obj/loong64: add {,x}vmadd series instructions support + 2025-11-26 c0f02c11ff cmd/internal/obj/loong64: add aliases to 32-bit arithmetic instructions + 2025-11-26 37ce4adcd4 cmd/compile: add tests bruteforcing limit complement + 2025-11-26 437d2362ce os,internal/poll: don't call IsNonblock for consoles and Stdin + 2025-11-26 71f8f031b2 crypto/internal/fips140/aes: optimize ctrBlocks8Asm on amd64 + 2025-11-26 03fcb33c0e cmd/compile: add tests bruteforcing limit negation and improve limit addition + 2025-11-26 dda7c8253d cmd/compile,internal/bytealg: add MemEq intrinsic for runtime.memequal + 2025-11-26 4976606a2f cmd/go: remove final references to modfetch.Fetcher_ + 2025-11-26 08bf23cb97 cmd/go/internal/toolchain: remove references to modfetch.Fetcher_ + 2025-11-26 46d5e3ea0e cmd/go/internal/modget: remove references to modfetch.Fetcher_ + 2025-11-26 a3a6c9f62a cmd/go/internal/load: remove references to modfetch.Fetcher_ + 2025-11-26 c1ef3d5881 cmd/go/internal/modcmd: remove references to modfetch.Fetcher_ + 2025-11-26 ab2829ec06 cmd/compile: adjust start heap size + 2025-11-26 54b82e944e internal/trace: support event constructor for testing + 2025-11-25 eb63ef9d66 runtime: panic if cleanup function closes over cleanup pointer + 2025-11-25 06412288cf runtime: panic on AddCleanup with self pointer + 2025-11-25 03f499ec46 cmd/go/internal/modfetch: remove references to Fetcher_ in test file + 2025-11-25 da31fd4177 cmd/go/internal/modload: replace references to modfetch.Fetcher_ + 2025-11-25 07b10e97d6 cmd/go/internal/modcmd: inject modfetch.Fetcher_ into DownloadModule + 2025-11-25 e96094402d cmd/go/internal/modload: inject modfetch.Fetcher_ into commitRequirements + 2025-11-25 47baf48890 cmd/go/internal/modfetch: inject Fetcher_ into TidyGoSum + 2025-11-25 272df5f6ba crypto/internal/fips140/aes/gcm: add more GCM nonce modes + 2025-11-25 1768cb40b8 crypto/tls: add SecP256r1/SecP384r1MLKEM1024 hybrid post-quantum key exchanges + 2025-11-25 a9093067ee cmd/internal/obj/loong64: add {,X}V{ADD,SUB}W{EV,OD}.{H.B,W.H,D.W,Q.D}{,U} instructions support + 2025-11-25 7b904c25a2 cmd/go/internal/modfetch: move global goSum to Fetcher_ + 2025-11-25 e7358c6cf4 cmd/go: remove fips140 dependency on global Fetcher_ + 2025-11-25 89f6dba7e6 internal/strconv: add testbase tests + 2025-11-25 6954be0baa internal/strconv: delete ftoaryu + 2025-11-25 8d6d14f5d6 compress/flate: move big non-pointer arrays to end of compressor + 2025-11-25 4ca048cc32 cmd/internal/obj/riscv: document compressed instructions + 2025-11-25 a572d571fa path: add more examples for path.Clean + 2025-11-25 eec40aae45 maps: use strings.EqualFold in example + 2025-11-25 113eb42efc strconv: replace Ryu ftoa with Dragonbox + 2025-11-25 6e5cfe94b0 crypto: fix dead links and correct SHA-512 algorithm comment + 2025-11-25 2c7c62b972 crypto/internal/fips140/sha512: interleave scheduling with rounds for 10.3% speed-up + 2025-11-25 5b34354bd3 crypto/internal/fips140/sha256: interleave scheduling and rounds for 11.2% speed-up + 2025-11-25 1cc1337f0a internal/runtime/cgroup: allow more tests to run on all OSes + 2025-11-25 6e4a0d8e44 crypto/internal/fips140/bigmod: vector implementation of addMulVVWx on s390x + 2025-11-25 657b331ff5 net/url: fix example of Values.Encode + 2025-11-25 bd9222b525 crypto/sha3: reduce cSHAKE allocations + 2025-11-25 e3088d6eb8 crypto/hpke: expose crypto/internal/hpke + 2025-11-25 a5ebc6b67c crypto/ecdsa: clean up ECDSA parsing and serialization paths + 2025-11-25 e8fdfeb72b reflect: add iterator equivalents for NumField, NumIn, NumOut and NumMethod + 2025-11-25 12d437c09a crypto/x509: sub-quadratic name constraint checking + 2025-11-25 ed4deb157e crypto/x509: cleanup name constraint tests + 2025-11-25 0d2baa808c crypto/rsa: add EncryptOAEPWithOptions + 2025-11-25 09e377b599 internal/poll: replace t.Sub(time.Now()) with time.Until in test + 2025-11-25 4fb7e083a8 crypto/tls: expose HelloRetryRequest state + 2025-11-24 31d373534e doc: pre-announce removal of 1.23 and earlier crypto GODEBUGs + 2025-11-24 aa093eed83 crypto/fips140: add Version + 2025-11-24 1dc1505d4a cmd/go/internal/modfetch: rename State to Fetcher + 2025-11-24 d3e11b3f90 cmd/go/internal/modload: make State.modfetchState a pointer + 2025-11-24 2f7fd5714f cmd/go: add setters for critical State fields + 2025-11-24 6851795fb6 runtime: add GODEBUG=tracebacklabels=1 to include pprof labels in tracebacks + 2025-11-24 0921e1db83 net/http: add Transport.NewClientConn + 2025-11-24 6465818435 all: update to x/net@bff14c52567061031b9761881907c39e24792736 + 2025-11-24 1a53ce9734 context: don't return the wrong error when Cause races cancellation + 2025-11-24 c6f882f6c5 crypto/x509: add ExtKeyUsage.String and KeyUsage.String methods + 2025-11-24 97d5295f6f crypto/internal/fips140test: add ML-DSA coverage + 2025-11-24 62cd044a79 cmd/compile: add cases for StringLen to prove + 2025-11-24 f1e376f342 cmd/go/internal/auth: fix typo + 2025-11-24 7fbd141de5 runtime: use m.profStack in traceStack + 2025-11-24 0bc192368a runtime: don't write unique string to trace if it's length zero + 2025-11-24 d4f5650cc5 all: REVERSE MERGE dev.simd (7d65463) into master Change-Id: I4273ac3987ae2d0bc1df0051d752d8ef6c5e9af5
2025-12-03[dev.simd] simd: make "best" instruction choice also depend on commutativityDavid Chase
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>
2025-11-26cmd/compile,internal/bytealg: add MemEq intrinsic for runtime.memequalAlexander Musman
Introduce a new MemEq SSA operation for runtime.memequal. The operation is initially implemented for arm64. The change adds opt rules (following existing rules for call to runtime.memequal), working with MemEq, and a later op version LoweredMemEq which may be lowered differently for more constant size cases in future (for other targets as well as for arm64). The new MemEq SSA operation does not have memory result, allowing cse of loads operations around it. Code size difference (for arm64 linux): Executable Old .text New .text Change ------------------------------------------------------- asm 1970420 1969668 -0.04% cgo 1741220 1740212 -0.06% compile 8956756 8959428 +0.03% cover 1879332 1878772 -0.03% link 2574116 2572660 -0.06% preprofile 867124 866820 -0.04% vet 2890404 2888596 -0.06% Change-Id: I6ab507929b861884d17d5818cfbd152cf7879751 Reviewed-on: https://go-review.googlesource.com/c/go/+/686655 Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
2025-11-25[dev.simd] simd, cmd/compile: add float -> float conversionsJunyang Shao
This should mark the end of the conversion table, except for float16 which does not exist on Go yet. The rounding logic documentation of float64 -> float32 is based on abi-internal default MXCSR: | RC | 14/13 | 0 (RN) | Round to nearest | Change-Id: I27a86560e8d74d20f21350bf78314b4eada20ec0 Reviewed-on: https://go-review.googlesource.com/c/go/+/724440 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-11-25[dev.simd] simd, cmd/compile: add int -> fp conversionsJunyang Shao
Change-Id: Iadfa2dd982d7156d60fb6977ed9afb7894d6e8a0 Reviewed-on: https://go-review.googlesource.com/c/go/+/724321 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-11-25[dev.simd] simd, cmd/compile: add float -> int conversionsJunyang Shao
This CL also fixed some documentation errors in existing APIs. Go defaults MXCSR to mask exceptions, the documentation is based on this fact. Change-Id: I745083b82b4bef93126a4b4e41f8698956963704 Reviewed-on: https://go-review.googlesource.com/c/go/+/724320 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-11-24[dev.simd] all: merge master (02d1f3a) into dev.simdCherry Mui
Merge List: + 2025-11-24 02d1f3a06b runtime: respect GOTRACEBACK for user-triggered runtime panics + 2025-11-24 a593ca9d65 runtime/cgo: add support for `any` param and return type + 2025-11-24 89552911b3 cmd/compile, internal/buildcfg: enable regABI on s390x, and add s390x + 2025-11-24 2fe0ba8d52 internal/bytealg: port bytealg functions to reg ABI on s390x + 2025-11-24 4529c8fba6 runtime: port memmove, memclr to register ABI on s390x + 2025-11-24 58a48a3e3b internal/runtime/syscall: Syscall changes for s390x regabi + 2025-11-24 2a185fae7e reflect, runtime: add reflect support for regabi on s390x + 2025-11-24 e92d2964fa runtime: mark race functions on s390x as ABIInternal + 2025-11-24 41af98eb83 runtime: add runtime changes for register ABI on s390x + 2025-11-24 85e6080089 cmd/internal/obj: set morestack arg spilling and regabi prologue on s390x + 2025-11-24 24697419c5 cmd/compile: update s390x CALL* ops + 2025-11-24 81242d034c cmd/compile/internal/s390x: add initial spill support + 2025-11-24 73b6aa0fec cmd/compile/internal: add register ABI information for s390x + 2025-11-24 1036f6f485 internal/abi: define s390x ABI constants + 2025-11-24 2e5d12a277 cmd/compile: document register-based ABI for s390x Change-Id: I57b4ae6f9b65d99958b9fe5974205770e18f7788
2025-11-24cmd/compile: update s390x CALL* opsSrinivas Pokala
This CL allow the CALL ops to take variable no of arguments. Update #40724 Change-Id: Ibfa2e98c5051684cae69200c396dfa1edb2878e4 Reviewed-on: https://go-review.googlesource.com/c/go/+/719464 Reviewed-by: Vishwanatha HD <vishwanatha.hd@ibm.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-24cmd/compile/internal: add register ABI information for s390xSrinivas Pokala
Update #40724 Change-Id: If8f2574259560b097db29347b2aecb098acef863 Reviewed-on: https://go-review.googlesource.com/c/go/+/719462 Reviewed-by: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Vishwanatha HD <vishwanatha.hd@ibm.com> Reviewed-by: Keith Randall <khr@google.com>
2025-11-24[dev.simd] all: merge master (8dd5b13) into dev.simdCherry Mui
Merge List: + 2025-11-24 8dd5b13abc cmd/compile: relax stmtline_test on amd64 + 2025-11-23 feae743bdb cmd/compile: use 32x32->64 multiplies on loong64 + 2025-11-23 e88be8a128 runtime: fix stale comment for mheap/malloc + 2025-11-23 a318843a2a cmd/internal/obj/loong64: optimize duplicate optab entries + 2025-11-23 a18294bb6a cmd/internal/obj/arm64, image/gif, runtime, sort: use math/bits to calculate log2 + 2025-11-23 437323ef7b slices: fix incorrect comment in slices.Insert function documentation + 2025-11-23 1993dca400 doc/next: pre-announce end of support for macOS 12 in Go 1.27 + 2025-11-22 337f7b1f5d cmd/go: update default go directive in mod or work init + 2025-11-21 3c26aef8fb cmd/internal/obj/riscv: improve large branch/call/jump tests + 2025-11-21 31aa9f800b crypto/tls: use inner hello for earlyData when using QUIC and ECH + 2025-11-21 d68aec8db1 runtime: replace trace seqlock with write flag + 2025-11-21 8d9906cd34 runtime/trace: add Log benchmark + 2025-11-21 6aeacdff38 cmd/go: support sha1 repos when git default is sha256 + 2025-11-21 9570036ca5 crypto/sha3: make the zero value of SHAKE useable + 2025-11-21 155efbbeeb crypto/sha3: make the zero value of SHA3 useable + 2025-11-21 6f16669e34 database/sql: don't ignore ColumnConverter for unknown input count + 2025-11-21 121bc3e464 runtime/pprof: remove hard-coded sleep in CPU profile reader + 2025-11-21 b604148c4e runtime: fix double wakeup in CPU profile buffer + 2025-11-21 22f24f90b5 cmd/compile: change testing.B.Loop keep alive semantic + 2025-11-21 cfb9d2eb73 net: remove unused linknames + 2025-11-21 65ef314f89 net/http: remove unused linknames + 2025-11-21 0f32fbc631 net/http: populate Response.Request when using NewFileTransport + 2025-11-21 3e0a8e7867 net/http: preserve original path encoding in redirects + 2025-11-21 831af61120 net/http: use HTTP 307 redirects in ServeMux + 2025-11-21 87269224cb net/http: update Response.Request.URL after redirects on GOOS=js + 2025-11-21 7aa9ca729f net/http/cookiejar: treat localhost as secure origin + 2025-11-21 f870a1d398 net/url: warn that JoinPath arguments should be escaped + 2025-11-21 9962d95fed crypto/internal/fips140/mldsa: unroll NTT and inverseNTT + 2025-11-21 f821fc46c5 crypto/internal/fisp140test: update acvptool, test data + 2025-11-21 b59efc38a0 crypto/internal/fips140/mldsa: new package + 2025-11-21 62741480b8 runtime: remove linkname for gopanic + 2025-11-21 7db2f0bb9a crypto/internal/hpke: separate KEM and PublicKey/PrivateKey interfaces + 2025-11-21 e15800c0ec crypto/internal/hpke: add ML-KEM and hybrid KEMs, and SHAKE KDFs + 2025-11-21 7c985a2df4 crypto/internal/hpke: modularize API and support more ciphersuites + 2025-11-21 e7d47ac33d cmd/compile: simplify negative on multiplication + 2025-11-21 35d2712b32 net/http: fix typo in Transport docs + 2025-11-21 90c970cd0f net: remove unnecessary loop variable copies in tests + 2025-11-21 9772d3a690 cmd/cgo: strip top-level const qualifier from argument frame struct + 2025-11-21 1903782ade errors: add examples for custom Is/As matching + 2025-11-21 ec92bc6d63 cmd/compile: rewrite Rsh to RshU if arguments are proved positive + 2025-11-21 3820f94c1d cmd/compile: propagate unsigned relations for Rsh if arguments are positive + 2025-11-21 d474f1fd21 cmd/compile: make dse track multiple shadowed ranges + 2025-11-21 d0d0a72980 cmd/compile/internal/ssa: correct type of ARM64 conditional instructions + 2025-11-21 a9704f89ea internal/runtime/gc/scan: add AVX512 impl of filterNil. + 2025-11-21 ccd389036a cmd/internal/objabi: remove -V=goexperiment internal special case + 2025-11-21 e7787b9eca runtime: go fmt + 2025-11-21 17b3b98796 internal/strconv: go fmt + 2025-11-21 c851827c68 internal/trace: go fmt + 2025-11-21 f87aaec53d cmd/compile: fix integer overflow in prove pass + 2025-11-21 dbd2ab9992 cmd/compile/internal: fix typos + 2025-11-21 b9d86baae3 cmd/compile/internal/devirtualize: fix typos + 2025-11-20 4b0e3cc1d6 cmd/link: support loading R_LARCH_PCREL20_S2 and R_LARCH_CALL36 relocs + 2025-11-20 cdba82c7d6 cmd/internal/obj/loong64: add {,X}VSLT.{B/H/W/V}{,U} instructions support + 2025-11-20 bd2b117c2c crypto/tls: add QUICErrorEvent + 2025-11-20 3ad2e113fc net/http/httputil: wrap ReverseProxy's outbound request body so Close is a noop + 2025-11-20 d58b733646 runtime: track goroutine location until actual STW + 2025-11-20 1bc54868d4 cmd/vendor: update to x/tools@68724af + 2025-11-20 8c3195973b runtime: disable stack allocation tests on sanitizers + 2025-11-20 ff654ea100 net/url: permit colons in the host of postgresql:// URLs + 2025-11-20 a662badab9 encoding/json: remove linknames + 2025-11-20 5afe237d65 mime: add missing path for mime types in godoc + 2025-11-20 c1b7112af8 os/signal: make NotifyContext cancel the context with a cause Change-Id: Ib93ef643be610dfbdd83ff45095a7b1ca2537b8b
2025-11-23cmd/compile: use 32x32->64 multiplies on loong64Xiaolin Zhao
Gets rid of some sign extensions, like arm64. Change-Id: I9fc37e15a82718bfcf53db8cab0c4e7baaa0a747 Reviewed-on: https://go-review.googlesource.com/c/go/+/721522 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Meidan Li <limeidan@loongson.cn> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-21[dev.simd] cmd/compile, simd: update conversion API namesJunyang Shao
This CL is to address some API audit discussion decisions. Change-Id: Iaa206832c41852fec8fa25c23da12f65df736098 Reviewed-on: https://go-review.googlesource.com/c/go/+/721780 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-11-21[dev.simd] cmd/compile: fix incorrect mapping of SHA256MSG2128Neal Patel
Change-Id: Iff00fdb5cfc83c546ad564fa7618ec34d0352fdc Reviewed-on: https://go-review.googlesource.com/c/go/+/722640 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: David Chase <drchase@google.com>
2025-11-20[dev.simd] simd, cmd/compile: add more element types for Select128FromPairDavid Chase
Also includes a comment cleanup pass. Fixed NAME processing for additional documentation. Change-Id: Ide5b60c17ddbf3c6eafd20147981c59493fc8133 Reviewed-on: https://go-review.googlesource.com/c/go/+/722180 Reviewed-by: Junyang Shao <shaojunyang@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-20[dev.simd] simd: fix signatures for PermuteConstant* methodsDavid Chase
This moves the packed-immediate methods to package-private, and adds exported versions with four parameters. Rename PermuteConstant to PermuteScalars Rename VPSHUFB Permute to PermuteOrZero Rename Permute2 to ConcatPermute Comments were repaired/enhanced. Modified the generator to support an additional tag "hideMaskMethods : true" to suppress method, intrinsic, generic, and generic translation generation for said mask-modified versions of such methods (this is already true for exported methods). Change-Id: I91e208c1fff1f28ebce4edb4e73d26003715018c Reviewed-on: https://go-review.googlesource.com/c/go/+/721342 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
2025-11-20[dev.simd] all: merge master (ca37d24) into dev.simdCherry Mui
Conflicts: - src/cmd/compile/internal/typecheck/builtin.go Merge List: + 2025-11-20 ca37d24e0b net/http: drop unused "broken" field from persistConn + 2025-11-20 4b740af56a cmd/internal/obj/x86: handle global reference in From3 in dynlink mode + 2025-11-20 790384c6c2 spec: adjust rule for type parameter on RHS of alias declaration + 2025-11-20 a49b0302d0 net/http: correctly close fake net.Conns + 2025-11-20 32f5aadd2f cmd/compile: stack allocate backing stores during append + 2025-11-20 a18aff8057 runtime: select GC mark workers during start-the-world + 2025-11-20 829779f4fe runtime: split findRunnableGCWorker in two + 2025-11-20 ab59569099 go/version: use "custom" as an example of a version suffix + 2025-11-19 c4bb9653ba cmd/compile: Implement LoweredZeroLoop with LSX Instruction on loong64 + 2025-11-19 7f2ae21fb4 cmd/internal/obj/loong64: add MULW.D.W[U] instructions + 2025-11-19 a2946f2385 crypto: add Encapsulator and Decapsulator interfaces + 2025-11-19 6b83bd7146 crypto/ecdh: add KeyExchanger interface + 2025-11-19 4fef9f8b55 go/types, types2: fix object path for grouped declaration statements + 2025-11-19 33529db142 spec: escape double-ampersands + 2025-11-19 dc42565a20 cmd/compile: fix control flow for unsigned divisions proof relations + 2025-11-19 e64023dcbf cmd/compile: cleanup useless if statement in prove + 2025-11-19 2239520d1c test: go fmt prove.go tests + 2025-11-19 489d3dafb7 math: switch s390x math.Pow to generic implementation + 2025-11-18 8c41a482f9 runtime: add dlog.hexdump + 2025-11-18 e912618bd2 runtime: add hexdumper + 2025-11-18 2cf9d4b62f Revert "net/http: do not discard body content when closing it within request handlers" + 2025-11-18 4d0658bb08 cmd/compile: prefer fixed registers for values + 2025-11-18 ba634ca5c7 cmd/compile: fold boolean NOT into branches + 2025-11-18 8806d53c10 cmd/link: align sections, not symbols after DWARF compress + 2025-11-18 c93766007d runtime: do not print recovered when double panic with the same value + 2025-11-18 9859b43643 cmd/asm,cmd/compile,cmd/internal/obj/riscv: use compressed instructions on riscv64 + 2025-11-17 b9ef0633f6 cmd/internal/sys,internal/goarch,runtime: enable the use of compressed instructions on riscv64 + 2025-11-17 a087dea869 debug/elf: sync new loong64 relocation types up to LoongArch ELF psABI v20250521 + 2025-11-17 e1a12c781f cmd/compile: use 32x32->64 multiplies on arm64 + 2025-11-17 6caab99026 runtime: relax TestMemoryLimit on darwin a bit more + 2025-11-17 eda2e8c683 runtime: clear frame pointer at thread entry points + 2025-11-17 6919858338 runtime: rename findrunnable references to findRunnable + 2025-11-17 8e734ec954 go/ast: fix BasicLit.End position for raw strings containing \r + 2025-11-17 592775ec7d crypto/mlkem: avoid a few unnecessary inverse NTT calls + 2025-11-17 590cf18daf crypto/mlkem/mlkemtest: add derandomized Encapsulate768/1024 + 2025-11-17 c12c337099 cmd/compile: teach prove about subtract idioms + 2025-11-17 bc15963813 cmd/compile: clean up prove pass + 2025-11-17 1297fae708 go/token: add (*File).End method + 2025-11-17 65c09eafdf runtime: hoist invariant code out of heapBitsSmallForAddrInline + 2025-11-17 594129b80c internal/runtime/maps: update doc for table.Clear + 2025-11-15 c58d075e9a crypto/rsa: deprecate PKCS#1 v1.5 encryption + 2025-11-14 d55ecea9e5 runtime: usleep before stealing runnext only if not in syscall + 2025-11-14 410ef44f00 cmd: update x/tools to 59ff18c + 2025-11-14 50128a2154 runtime: support runtime.freegc in size-specialized mallocs for noscan objects + 2025-11-14 c3708350a4 cmd/go: tests: rename git-min-vers->git-sha256 + 2025-11-14 aea881230d std: fix printf("%q", int) mistakes + 2025-11-14 120f1874ef runtime: add more precise test of assist credit handling for runtime.freegc + 2025-11-14 fecfcaa4f6 runtime: add runtime.freegc to reduce GC work + 2025-11-14 5a347b775e runtime: set GOEXPERIMENT=runtimefreegc to disabled by default + 2025-11-14 1a03d0db3f runtime: skip tests for GOEXPERIMENT=arenas that do not handle clobberfree=1 + 2025-11-14 cb0d9980f5 net/http: do not discard body content when closing it within request handlers + 2025-11-14 03ed43988f cmd/compile: allow multi-field structs to be stored directly in interfaces + 2025-11-14 1bb1f2bf0c runtime: put AddCleanup cleanup arguments in their own allocation + 2025-11-14 9fd2e44439 runtime: add AddCleanup benchmark + 2025-11-14 80c91eedbb runtime: ensure weak handles end up in their own allocation + 2025-11-14 7a8d0b5d53 runtime: add debug mode to extend _Grunning-without-P windows + 2025-11-14 710abf74da internal/runtime/cgobench: add Go function call benchmark for comparison + 2025-11-14 b24aec598b doc, cmd/internal/obj/riscv: document the riscv64 assembler + 2025-11-14 a0e738c657 cmd/compile/internal: remove incorrect riscv64 SLTI rule + 2025-11-14 2cdcc4150b cmd/compile: fold negation into multiplication + 2025-11-14 b57962b7c7 bytes: fix panic in bytes.Buffer.Peek + 2025-11-14 0a569528ea cmd/compile: optimize comparisons with single bit difference + 2025-11-14 1e5e6663e9 cmd/compile: remove unnecessary casts and types from riscv64 rules + 2025-11-14 ddd8558e61 go/types, types2: swap object.color for Checker.objPathIdx + 2025-11-14 9daaab305c cmd/link/internal/ld: make runtime.buildVersion with experiments valid + 2025-11-13 d50a571ddf test: fix tests to work with sizespecializedmalloc turned off + 2025-11-13 704f841eab cmd/trace: annotation proc start/stop with thread and proc always + 2025-11-13 17a02b9106 net/http: remove unused isLitOrSingle and isNotToken + 2025-11-13 ff61991aed cmd/go: fix flaky TestScript/mod_get_direct + 2025-11-13 129d0cb543 net/http/cgi: accept INCLUDED as protocol for server side includes + 2025-11-13 77c5130100 go/types: minor simplification + 2025-11-13 7601cd3880 go/types: generate cycles.go + 2025-11-13 7a372affd9 go/types, types2: rename definedType to declaredType and clarify docs Change-Id: Ibaa9bdb982364892f80e511c1bb12661fcd5fb86
2025-11-20cmd/compile: stack allocate backing stores during appendkhr@golang.org
We can already stack allocate the backing store during append if the resulting backing store doesn't escape. See CL 664299. This CL enables us to often stack allocate the backing store during append *even if* the result escapes. Typically, for code like: func f(n int) []int { var r []int for i := range n { r = append(r, i) } return r } the backing store for r escapes, but only by returning it. Could we operate with r on the stack for most of its lifeime, and only move it to the heap at the return point? The current implementation of append will need to do an allocation each time it calls growslice. This will happen on the 1st, 2nd, 4th, 8th, etc. append calls. The allocations done by all but the last growslice call will then immediately be garbage. We'd like to avoid doing some of those intermediate allocations if possible. We rewrite the above code by introducing a move2heap operation: func f(n int) []int { var r []int for i := range n { r = append(r, i) } r = move2heap(r) return r } Using the move2heap runtime function, which does: move2heap(r): If r is already backed by heap storage, return r. Otherwise, copy r to the heap and return the copy. Now we can treat the backing store of r allocated at the append site as not escaping. Previous stack allocation optimizations now apply, which can use a fixed-size stack-allocated backing store for r when appending. See the description in cmd/compile/internal/slice/slice.go for how we ensure that this optimization is safe. Change-Id: I81f36e58bade2241d07f67967d8d547fff5302b8 Reviewed-on: https://go-review.googlesource.com/c/go/+/707755 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-19cmd/compile: Implement LoweredZeroLoop with LSX Instruction on loong64Guoqi Chen
goos: linux goarch: loong64 pkg: runtime cpu: Loongson-3A6000 @ 2500.00MHz | old.txt | new.txt | | sec/op | sec/op vs base | ClearFat256 6.406n ± 0% 3.329n ± 1% -48.03% (p=0.000 n=10) ClearFat512 12.810n ± 0% 7.607n ± 0% -40.62% (p=0.000 n=10) ClearFat1024 25.62n ± 0% 14.01n ± 0% -45.32% (p=0.000 n=10) ClearFat1032 26.02n ± 0% 14.28n ± 0% -45.14% (p=0.000 n=10) ClearFat1040 26.02n ± 0% 14.41n ± 0% -44.62% (p=0.000 n=10) MemclrKnownSize192 4.804n ± 0% 2.827n ± 0% -41.15% (p=0.000 n=10) MemclrKnownSize248 6.561n ± 0% 4.371n ± 0% -33.38% (p=0.000 n=10) MemclrKnownSize256 6.406n ± 0% 3.335n ± 0% -47.94% (p=0.000 n=10) geomean 11.41n 6.453n -43.45% goos: linux goarch: loong64 pkg: runtime cpu: Loongson-3C5000 @ 2200.00MHz | old.txt | new.txt | | sec/op | sec/op vs base | ClearFat256 14.570n ± 0% 7.284n ± 0% -50.01% (p=0.000 n=10) ClearFat512 29.13n ± 0% 14.57n ± 0% -49.98% (p=0.000 n=10) ClearFat1024 58.26n ± 0% 29.15n ± 0% -49.97% (p=0.000 n=10) ClearFat1032 58.73n ± 0% 29.15n ± 0% -50.36% (p=0.000 n=10) ClearFat1040 59.18n ± 0% 29.26n ± 0% -50.56% (p=0.000 n=10) MemclrKnownSize192 10.930n ± 0% 5.466n ± 0% -49.99% (p=0.000 n=10) MemclrKnownSize248 14.110n ± 0% 6.772n ± 0% -52.01% (p=0.000 n=10) MemclrKnownSize256 14.570n ± 0% 7.285n ± 0% -50.00% (p=0.000 n=10) geomean 25.75n 12.78n -50.36% Change-Id: I88d7b6ae2f6fc3f095979f24fb83ff42a9d2d42e Reviewed-on: https://go-review.googlesource.com/c/go/+/720940 Reviewed-by: Meidan Li <limeidan@loongson.cn> Reviewed-by: Mark Freeman <markfreeman@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
2025-11-18[dev.simd] cmd/compile, simd: change DotProductQuadruple and add peepholesJunyang Shao
This CL addressed some API change decisions in the API audit. Instead of exposing the Intel format, we hide the add part of the instructions under the peephole, and rename the API as DotProdQuadruple Change-Id: I471c0a755174bc15dd83bdc0f757d6356b92d835 Reviewed-on: https://go-review.googlesource.com/c/go/+/721420 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-18[dev.simd] cmd/compile, simd: change SHA ops names and typesJunyang Shao
This CL addressed some naming changes decided in API audit. Before After SHA1Msg1 SHA1Message1, Remove signed SHA1Msg2 SHA1Message2, Remove signed SHA1NextE SHA1NextE, Remove signed SHA1Round4 SHA1FourRounds, Remove signed SHA256Msg1 SHA256Message1, Remove signed SHA256Msg2 SHA256Message2, Remove signed SHA256Rounds2 SHA256TwoRounds, Remove signed Change-Id: If2cead113f37a9044bc5c65e78fa9d124e318005 Reviewed-on: https://go-review.googlesource.com/c/go/+/721003 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-17[dev.simd] cmd/compile, simd: change AES op names and add missing sizeJunyang Shao
This CL changed AESEncryptRound and AESDecryptRound to AESEncryptOneRound and AESDecryptOneRound. This CL also adds the 512-bit version of some AES instructions. Change-Id: Ia851a008cce2145b1ff193a89e172862060a725d Reviewed-on: https://go-review.googlesource.com/c/go/+/721280 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
2025-11-17[dev.simd] cmd/compile, simd: add VPALIGNRJunyang Shao
This CL named VPALIGNR ConcatShiftBytes[Grouped]. Change-Id: I46c6703085efb0613deefa512de9911b4fdf6bc4 Reviewed-on: https://go-review.googlesource.com/c/go/+/714440 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-17[dev.simd] cmd/compile: fix unstable outputJunyang Shao
This CL fixed an error left by CL 718160. Change-Id: I442ea59bc1ff0dda2914d1858dd5ebe93e2818dc Reviewed-on: https://go-review.googlesource.com/c/go/+/720281 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-11-13[dev.simd] all: merge master (57362e9) into dev.simdCherry Mui
Conflicts: - src/cmd/compile/internal/ir/symtab.go - src/cmd/compile/internal/ssa/prove.go - src/cmd/compile/internal/ssa/rewriteAMD64.go - src/cmd/compile/internal/ssagen/intrinsics.go - src/cmd/compile/internal/typecheck/builtin.go - src/internal/buildcfg/exp.go - src/internal/strconv/ftoa.go - test/codegen/stack.go Manually resolved some conflicts: - Use internal/strconv for simd.String, remove internal/ftoa - prove.go is just copied from the one on the main branch. We have cherry-picked the changes to prove.go to main branch, so our copy is identical to an old version of the one on the main branch. There are CLs landed after our cherry-picks. Just copy it over to adopt the new code. Merge List: + 2025-11-13 57362e9814 go/types, types2: check for direct cycles as a separate phase + 2025-11-13 099e0027bd cmd/go/internal/modfetch: consolidate global vars + 2025-11-13 028375323f cmd/go/internal/modfetch/codehost: fix flaky TestReadZip + 2025-11-13 4ebf295b0b runtime: prefer to restart Ps on the same M after STW + 2025-11-13 625d8e9b9c runtime/pprof: fix goroutine leak profile tests for noopt + 2025-11-13 4684a26c26 spec: remove cycle restriction for type parameters + 2025-11-13 0f9c8fb29d cmd/asm,cmd/internal/obj/riscv: add support for riscv compressed instructions + 2025-11-13 a15d036ce2 cmd/internal/obj/riscv: implement better bit pattern encoding + 2025-11-12 abb241a789 cmd/internal/obj/loong64: add {,X}VS{ADD,SUB}.{B/H/W/V}{,U} instructions support + 2025-11-12 0929d21978 cmd/go: keep objects alive while stopping cleanups + 2025-11-12 f03d06ec1a runtime: fix list test memory management for mayMoreStack + 2025-11-12 48127f656b crypto/internal/fips140/sha3: remove outdated TODO + 2025-11-12 c3d1d42764 sync/atomic: amend comments for Value.{Swap,CompareAndSwap} + 2025-11-12 e0807ba470 cmd/compile: don't clear ptrmask in fillptrmask + 2025-11-12 66318d2b4b internal/abi: correctly describe result in Name.Name doc comment + 2025-11-12 34aef89366 cmd/compile: use FCLASSD for subnormal checks on riscv64 + 2025-11-12 0c28789bd7 net/url: disallow raw IPv6 addresses in host + 2025-11-12 4e761b9a18 cmd/compile: optimize liveness in stackalloc + 2025-11-12 956909ff84 crypto/x509: move BetterTLS suite from crypto/tls + 2025-11-12 6525f46707 cmd/link: change shdr and phdr from arrays to slices + 2025-11-12 d3aeba1670 runtime: switch p.gcFractionalMarkTime to atomic.Int64 + 2025-11-12 8873e8bea2 runtime,runtime/pprof: clean up goroutine leak profile writing + 2025-11-12 b8b84b789e cmd/go: clarify the -o testflag is only for copying the binary + 2025-11-12 c761b26b56 mime: parse media types that contain braces + 2025-11-12 65858a146e os/exec: include Cmd.Start in the list of methods that run Cmd + 2025-11-11 4bfc3a9d14 std,cmd: go fix -any std cmd + 2025-11-11 2263d4aabd runtime: doubly-linked sched.midle list + 2025-11-11 046dce0e54 runtime: use new list type for spanSPMCs + 2025-11-11 5f11275457 runtime: reusable intrusive doubly-linked list + 2025-11-11 951cf0501b internal/trace/testtrace: fix flag name typos + 2025-11-11 2750f95291 cmd/go: implement accurate pseudo-versions for Mercurial + 2025-11-11 b709a3e8b4 cmd/go/internal/vcweb: cache hg servers + 2025-11-11 426ef30ecf cmd/go: implement -reuse for Mercurial repos + 2025-11-10 5241d114f5 spec: more precise prose for special case of append + 2025-11-10 cdf64106f6 go/types, types2: first argument to append must never be be nil + 2025-11-10 a0eb4548cf .gitignore: ignore go test artifacts + 2025-11-10 bf58e7845e internal/trace: add "command" to convert text traces to raw + 2025-11-10 052c192a4c runtime: fix lock rank for work.spanSPMCs.lock + 2025-11-10 bc5ffe5c79 internal/runtime/sys,math/bits: eliminate bounds checks on len8tab + 2025-11-10 32f8d6486f runtime: document that tracefpunwindoff applies to some profilers + 2025-11-10 1c1c1942ba cmd/go: remove redundant AVX regex in security flag checks + 2025-11-10 3b3d6b9e5d cmd/internal/obj/arm64: shorten constant integer loads + 2025-11-10 5f4b5f1a19 runtime/msan: use different msan routine for copying + 2025-11-10 0fe6c8e8c8 runtime: tweak wording for comment of mcache.flushGen + 2025-11-10 95a0e5adc1 sync: don't call Done when f() panics in WaitGroup.Go + 2025-11-08 e8ed85d6c2 cmd/go: update goSum if necessary + 2025-11-08 b76103c08e cmd/go: output missing GoDebug entries + 2025-11-07 47a63a331d cmd/go: rewrite hgrepo1 test repo to be deterministic + 2025-11-07 7995751d3a cmd/go: copy git reuse and support repos to hg + 2025-11-07 66c7ca7fb3 cmd/go: improve TestScript/reuse_git + 2025-11-07 de84ac55c6 cmd/link: clean up some comments to Go standards + 2025-11-07 5cd1b73772 runtime: correctly print panics before fatal-ing on defer + 2025-11-07 91ca80f970 runtime/cgo: improve error messages after pointer panic + 2025-11-07 d36e88f21f runtime: tweak wording for doc + 2025-11-06 ad3ccd92e4 cmd/link: move pclntab out of relro section + 2025-11-06 43b91e7abd iter: fix a tiny doc comment bug + 2025-11-06 48c7fa13c6 Revert "runtime: remove the pc field of _defer struct" + 2025-11-05 8111104a21 cmd/internal/obj/loong64: add {,X}VSHUF.{B/H/W/V} instructions support + 2025-11-05 2e2072561c cmd/internal/obj/loong64: add {,X}VEXTRINS.{B,H,W,V} instruction support + 2025-11-05 01c29d1f0b internal/chacha8rand: replace VORV with instruction VMOVQ on loong64 + 2025-11-05 f01a1841fd cmd/compile: fix error message on loong64 + 2025-11-05 8cf7a0b4c9 cmd/link: support weak binding on darwin + 2025-11-05 2dd7e94e16 cmd/go: use go.dev instead of golang.org in flag errors + 2025-11-05 28f1ad5782 cmd/go: fix TestScript/govcs + 2025-11-05 daa220a1c9 cmd/go: silence TLS handshake errors during test + 2025-11-05 3ae9e95002 cmd/go: fix TestCgoPkgConfig on darwin with pkg-config installed + 2025-11-05 a494a26bc2 cmd/go: fix TestScript/vet_flags + 2025-11-05 a8fb94969c cmd/go: fix TestScript/tool_build_as_needed + 2025-11-05 04f05219c4 cmd/cgo: skip escape checks if call site has no argument + 2025-11-04 9f3a108ee0 os: ignore O_TRUNC errors on named pipes and terminal devices on Windows + 2025-11-04 0e1bd8b5f1 cmd/link, runtime: don't store text start in pcHeader + 2025-11-04 7347b54727 cmd/link: don't generate .gosymtab section + 2025-11-04 6914dd11c0 cmd/link: add and use new SymKind SFirstUnallocated + 2025-11-04 f5f14262d0 cmd/link: remove misleading comment + 2025-11-04 61de3a9dae cmd/link: remove unused SFILEPATH symbol kind + 2025-11-04 8e2bd267b5 cmd/link: add comments for SymKind values + 2025-11-04 16705b962e cmd/compile: faster liveness analysis in regalloc + 2025-11-04 a5fe6791d7 internal/syscall/windows: fix ReOpenFile sentinel error value + 2025-11-04 a7d174ccaa cmd/compile/internal/ssa: simplify riscv64 FCLASSD rewrite rules + 2025-11-04 856238615d runtime: amend doc for setPinned + 2025-11-04 c7ccbddf22 cmd/compile/internal/ssa: more aggressive on dead auto elim + 2025-11-04 75b2bb1d1a cmd/cgo: drop pre-1.18 support + 2025-11-04 dd839f1d00 internal/strconv: handle %f with fixedFtoa when possible + 2025-11-04 6e165b4d17 cmd/compile: implement Avg64u, Hmul64, Hmul64u for wasm + 2025-11-04 9f6590f333 encoding/pem: don't reslice in failure modes + 2025-11-03 34fec512ce internal/strconv: extract fixed-precision ftoa from ftoaryu.go + 2025-11-03 162ba6cc40 internal/strconv: add tests and benchmarks for ftoaFixed + 2025-11-03 9795c7ba22 internal/strconv: fix pow10 off-by-one in exponent result + 2025-11-03 ad5e941a45 cmd/internal/obj/loong64: using {xv,v}slli.d to perform copying between vector registers + 2025-11-03 dadbac0c9e cmd/internal/obj/loong64: add VPERMI.W, XVPERMI.{W,V,Q} instruction support + 2025-11-03 e2c6a2024c runtime: avoid append in printint, printuint + 2025-11-03 c93cc603cd runtime: allow Stack to traceback goroutines in syscall _Grunning window + 2025-11-03 b5353fd90a runtime: don't panic in castogscanstatus + 2025-11-03 43491f8d52 cmd/cgo: use the export'ed file/line in error messages + 2025-11-03 aa94fdf0cc cmd/go: link to go.dev/doc/godebug for removed GODEBUG settings + 2025-11-03 4d2b03d2fc crypto/tls: add BetterTLS test coverage + 2025-11-03 0c4444e13d cmd/internal/obj: support arm64 FMOVQ large offset encoding + 2025-11-03 85bec791a0 cmd/go/testdata/script: loosen list_empty_importpath for freebsd + 2025-11-03 17b57078ab internal/runtime/cgobench: add cgo callback benchmark + 2025-11-03 5f8fdb720c cmd/go: move functions to methods + 2025-11-03 0a95856b95 cmd/go: eliminate additional global variable + 2025-11-03 f93186fb44 cmd/go/internal/telemetrystats: count cgo usage + 2025-11-03 eaf28a27fd runtime: update outdated comments for deferprocStack + 2025-11-03 e12d8a90bf all: remove extra space in the comments + 2025-11-03 c5559344ac internal/profile: optimize Parse allocs + 2025-11-03 5132158ac2 bytes: add Buffer.Peek + 2025-11-03 361d51a6b5 runtime: remove the pc field of _defer struct + 2025-11-03 00ee1860ce crypto/internal/constanttime: expose intrinsics to the FIPS 140-3 packages + 2025-11-02 388c41c412 cmd/go: skip git sha256 tests if git < 2.29 + 2025-11-01 385dc33250 runtime: prevent time.Timer.Reset(0) from deadlocking testing/synctest tests + 2025-10-31 99b724f454 cmd/go: document purego convention + 2025-10-31 27937289dc runtime: avoid zeroing scavenged memory + 2025-10-30 89dee70484 runtime: prioritize panic output over racefini + 2025-10-30 8683bb846d runtime: optimistically CAS atomicstatus directly in enter/exitsyscall + 2025-10-30 5b8e850340 runtime: don't track scheduling latency for _Grunning <-> _Gsyscall + 2025-10-30 251814e580 runtime: document tracer invariants explicitly + 2025-10-30 7244e9221f runtime: eliminate _Psyscall + 2025-10-30 5ef19c0d0c strconv: delete divmod1e9 + 2025-10-30 d32b1f02c3 runtime: delete timediv + 2025-10-30 cbbd385cb8 strconv: remove arch-specific decision in formatBase10 + 2025-10-30 6aca04a73a reflect: correct internal docs for uncommonType + 2025-10-30 235b4e729d cmd/compile/internal/ssa: model right shift more precisely + 2025-10-30 d44db293f9 go/token: fix a typo in a comment + 2025-10-30 cdc6b559ca strconv: remove hand-written divide on 32-bit systems + 2025-10-30 1e5bb416d8 cmd/compile: implement bits.Mul64 on 32-bit systems + 2025-10-30 38317c44e7 crypto/internal/fips140/aes: fix CTR generator + 2025-10-29 3be9a0e014 go/types, types: proceed with correct (invalid) type in case of a selector error + 2025-10-29 d2c5fa0814 strconv: remove &0xFF trick in formatBase10 + 2025-10-29 9bbda7c99d cmd/compile: make prove understand div, mod better + 2025-10-29 915c1839fe test/codegen: simplify asmcheck pattern matching + 2025-10-29 32ee3f3f73 runtime: tweak example code for gorecover + 2025-10-29 da3fb90b23 crypto/internal/fips140/bigmod: fix extendedGCD comment + 2025-10-29 9035f7aea5 runtime: use internal/strconv + 2025-10-29 49c1da474d internal/itoa, internal/runtime/strconv: delete + 2025-10-29 b2a346bbd1 strconv: move all but Quote to internal/strconv + 2025-10-28 041f564b3e internal/runtime/gc/scan: avoid memory destination on VPCOMPRESSQ + 2025-10-28 81afd3a59b cmd/compile: extend ppc64 MADDLD to match const ADDconst & MULLDconst + 2025-10-28 ea50d61b66 cmd/compile: name change isDirect -> isDirectAndComparable + 2025-10-28 bd4dc413cd cmd/compile: don't optimize away a panicing interface comparison + 2025-10-28 30c047d0d0 cmd/compile: extend loong MOV*idx rules to match ADDshiftLLV + 2025-10-28 46e5e2b09a runtime: define PanicBounds in funcdata.h + 2025-10-28 3da0356685 crypto/internal/fips140test: collect 300M entropy samples for ESV + 2025-10-28 d5953185d5 runtime: amend comments a bit + 2025-10-28 12c8d14d94 errors: document that the target of Is must be comparable + 2025-10-28 1f4d14e493 go/types, types2: pull up package-level object sort to a separate phase + 2025-10-28 b8aa1ee442 go/types, types2: reduce locks held at once in resolveUnderlying + 2025-10-28 24af441437 cmd/compile: rewrite proved multiplies by 0 or 1 into CondSelect + 2025-10-28 2d33a456c6 cmd/compile: move branchelim supported arches to Config + 2025-10-27 2c91c33e88 crypto/subtle,cmd/compile: add intrinsics for ConstantTimeSelect and *Eq + 2025-10-27 73d7635fae cmd/compile: add generic rules to remove bool → int → bool roundtrips + 2025-10-27 1662d55247 cmd/compile: do not Zext bools to 64bits in amd64 CMOV generation rules + 2025-10-27 b8468d8c4e cmd/compile: introduce bytesizeToConst to cleanup switches in prove + 2025-10-27 9e25c2f6de cmd/link: internal linking support for windows/arm64 + 2025-10-27 ff2ebf69c4 internal/runtime/gc/scan: correct size class size check + 2025-10-27 9a77aa4f08 cmd/compile: add position info to sccp debug messages + 2025-10-27 77dc138030 cmd/compile: teach prove about unsigned rounding-up divide + 2025-10-27 a0f33b2887 cmd/compile: change !l.nonzero() into l.maybezero() + 2025-10-27 5453b788fd cmd/compile: optimize Add64carry with unused carries into plain Add64 + 2025-10-27 2ce5aab79e cmd/compile: remove 68857 ModU flowLimit workaround in prove + 2025-10-27 a50de4bda7 cmd/compile: remove 68857 min & max flowLimit workaround in prove + 2025-10-27 53be78630a cmd/compile: use topo-sort in prove to correctly learn facts while walking once + 2025-10-27 dec2b4c83d runtime: avoid bound check in freebsd binuptime + 2025-10-27 916e682d51 cmd/internal/obj, cmd/asm: reclassify the offset of memory access operations on loong64 + 2025-10-27 2835b994fb cmd/go: remove global loader state variable + 2025-10-27 139f89226f cmd/go: use local state for telemetry + 2025-10-27 8239156571 cmd/go: use tagged switch + 2025-10-27 d741483a1f cmd/go: increase stmt threshold on amd64 + 2025-10-27 a6929cf4a7 cmd/go: removed unused code in toolchain.Exec + 2025-10-27 180c07e2c1 go/types, types2: clarify docs for resolveUnderlying + 2025-10-27 d8a32f3d4b go/types, types2: wrap Named.fromRHS into Named.rhs + 2025-10-27 b2af92270f go/types, types2: verify stateMask transitions in debug mode + 2025-10-27 92decdcbaa net/url: further speed up escape and unescape + 2025-10-27 5f4ec3541f runtime: remove unused cgoCheckUsingType function + 2025-10-27 189f2c08cc time: rewrite IsZero method to use wall and ext fields + 2025-10-27 f619b4a00d cmd/go: reorder parameters so that context is first + 2025-10-27 f527994c61 sync: update comments for Once.done + 2025-10-26 5dcaf9a01b runtime: add GOEXPERIMENT=runtimefree + 2025-10-26 d7a52f9369 cmd/compile: use MOV(D|F) with const for Const(64|32)F on riscv64 + 2025-10-26 6f04a92be3 internal/chacha8rand: provide vector implementation for riscv64 + 2025-10-26 54e3adc533 cmd/go: use local loader state in test + 2025-10-26 ca379b1c56 cmd/go: remove loaderstate dependency + 2025-10-26 83a44bde64 cmd/go: remove unused loader state + 2025-10-26 7e7cd9de68 cmd/go: remove temporary rf cleanup script + 2025-10-26 53ad68de4b cmd/compile: allow unaligned load/store on Wasm + 2025-10-25 12ec09f434 cmd/go: use local state object in work.runBuild and work.runInstall + 2025-10-24 643f80a11f runtime: add ppc and s390 to 32 build constraints for gccgo + 2025-10-24 0afbeb5102 runtime: add ppc and s390 to linux 32 bits syscall build constraints for gccgo + 2025-10-24 7b506d106f cmd/go: use local state object in `generate.runGenerate` + 2025-10-24 26a8a21d7f cmd/go: use local state object in `env.runEnv` + 2025-10-24 f2dd3d7e31 cmd/go: use local state object in `vet.runVet` + 2025-10-24 784700439a cmd/go: use local state object in pkg `workcmd` + 2025-10-24 69673e9be2 cmd/go: use local state object in `tool.runTool` + 2025-10-24 2e12c5db11 cmd/go: use local state object in `test.runTest` + 2025-10-24 fe345ff2ae cmd/go: use local state object in `modget.runGet` + 2025-10-24 d312e27e8b cmd/go: use local state object in pkg `modcmd` + 2025-10-24 ea9cf26aa1 cmd/go: use local state object in `list.runList` + 2025-10-24 9926e1124e cmd/go: use local state object in `bug.runBug` + 2025-10-24 2c4fd7b2cd cmd/go: use local state object in `run.runRun` + 2025-10-24 ade9f33e1f cmd/go: add loaderstate as field on `mvsReqs` + 2025-10-24 ccf4192a31 cmd/go: make ImportMissingError work with local state + 2025-10-24 f5403f15f0 debug/pe: check for zdebug_gdb_scripts section in testDWARF + 2025-10-24 a26f860fa4 runtime: use 32-bit hash for maps on Wasm + 2025-10-24 747fe2efed encoding/json/v2: fix typo in documentation about errors.AsType + 2025-10-24 94f47fc03f cmd/link: remove pointless assignment in SetSymAlign + 2025-10-24 e6cff69051 crypto/x509: move constraint checking after chain building + 2025-10-24 f5f69a3de9 encoding/json/jsontext: avoid pinning application data in pools + 2025-10-24 a6a59f0762 encoding/json/v2: use slices.Sort directly + 2025-10-24 0d3dab9b1d crypto/x509: simplify candidate chain filtering + 2025-10-24 29046398bb cmd/go: refactor injection of modload.LoaderState + 2025-10-24 c18fa69e52 cmd/go: make ErrNoModRoot work with local state + 2025-10-24 296ecc918d cmd/go: add modload.State parameter to AllowedFunc + 2025-10-24 c445a61e52 cmd/go: add loaderstate as field on `QueryMatchesMainModulesError` + 2025-10-24 6ac40051d3 cmd/go: remove module loader state from ccompile + 2025-10-24 6a5a452528 cmd/go: inject vendor dir into builder struct + 2025-10-23 dfac972233 crypto/pbkdf2: add missing error return value in example + 2025-10-23 47bf8f073e unique: fix inconsistent panic prefix in canonmap cleanup path + 2025-10-23 03bd43e8bb go/types, types2: rename Named.resolve to unpack + 2025-10-23 9fcdc814b2 go/types, types2: rename loaded namedState to lazyLoaded + 2025-10-23 8401512a9b go/types, types2: rename complete namedState to hasMethods + 2025-10-23 cf826bfcb4 go/types, types2: set t.underlying exactly once in resolveUnderlying + 2025-10-23 c4e910895b net/url: speed up escape and unescape + 2025-10-23 3f6ac3a10f go/build: use slices.Equal + 2025-10-23 839da71f89 encoding/pem: properly calculate end indexes + 2025-10-23 39ed968832 cmd: update golang.org/x/arch for riscv64 disassembler + 2025-10-23 ca448191c9 all: replace Split in loops with more efficient SplitSeq + 2025-10-23 107fcb70de internal/goroot: replace HasPrefix+TrimPrefix with CutPrefix + 2025-10-23 8378276d66 strconv: optimize int-to-decimal and use consistently + 2025-10-23 e5688d0bdd cmd/internal/obj/riscv: simplify validation and encoding of raw instructions + 2025-10-22 77fc27972a doc/next: improve new(expr) release note + 2025-10-22 d94a8c56ad runtime: cleanup pagetrace + 2025-10-22 02728a2846 crypto/internal/fips140test: add entropy SHA2-384 testing + 2025-10-22 f92e01c117 runtime/cgo: fix cgoCheckArg description + 2025-10-22 50586182ab runtime: use backoff and ISB instruction to reduce contention in (*lfstack).pop and (*spanSet).pop on arm64 + 2025-10-22 1ff59f3dd3 strconv: clean up powers-of-10 table, tests + 2025-10-22 7c9fa4d5e9 cmd/go: check if build output should overwrite files with renames + 2025-10-22 557b4d6e0f comment: change slice to string in function comment/help + 2025-10-22 d09a8c8ef4 go/types, types2: simplify locking in Named.resolveUnderlying + 2025-10-22 5a42af7f6c go/types, types2: in resolveUnderlying, only compute path when needed + 2025-10-22 4bdb55b5b8 go/types, types2: rename Named.under to Named.resolveUnderlying + 2025-10-21 29d43df8ab go/build, cmd/go: use ast.ParseDirective for go:embed + 2025-10-21 4e695dd634 go/ast: add ParseDirective for parsing directive comments + 2025-10-21 06e57e60a7 go/types, types2: only report version errors if new(expr) is ok otherwise + 2025-10-21 6c3d0d259f path/filepath: reword documentation for Rel + 2025-10-21 39fd61ddb0 go/types, types2: guard Named.underlying with Named.mu + 2025-10-21 4a0115c886 runtime,syscall: implement and use syscalln on darwin + 2025-10-21 261c561f5a all: gofmt -w + 2025-10-21 c9c78c06ef strconv: embed testdata in test + 2025-10-21 8f74f9daf4 sync: re-enable race even when panicking + 2025-10-21 8a6c64f4fe syscall: use rawSyscall6 to call ptrace in forkAndExecInChild + 2025-10-21 4620db72d2 runtime: use timer_settime64 on 32-bit Linux + 2025-10-21 b31dc77cea os: support deleting read-only files in RemoveAll on older Windows versions + 2025-10-21 46cc532900 cmd/compile/internal/ssa: fix typo in comment + 2025-10-21 2163a58021 crypto/internal/fips140/entropy: increase AllocsPerRun iterations + 2025-10-21 306eacbc11 cmd/go/testdata/script: disable list_empty_importpath test on Windows + 2025-10-21 a5a249d6a6 all: eliminate unnecessary type conversions + 2025-10-21 694182d77b cmd/internal/obj/ppc64: improve large prologue generation + 2025-10-21 b0dcb95542 cmd/compile: leave the horses alone + 2025-10-21 9a5a1202f4 runtime: clean dead architectures from go:build constraint + 2025-10-21 8539691d0c crypto/internal/fips140/entropy: move to crypto/internal/entropy/v1.0.0 + 2025-10-20 99cf4d671c runtime: save lasx and lsx registers in loong64 async preemption + 2025-10-20 79ae97fe9b runtime: make procyieldAsm no longer loop infinitely if passed 0 + 2025-10-20 f838faffe2 runtime: wrap procyield assembly and check for 0 + 2025-10-20 ee4d2c312d runtime/trace: dump test traces on validation failure + 2025-10-20 7b81a1e107 net/url: reduce allocs in Encode + 2025-10-20 e425176843 cmd/asm: fix typo in comment + 2025-10-20 dc9a3e2a65 runtime: fix generation skew with trace reentrancy + 2025-10-20 df33c17091 runtime: add _Gdeadextra status + 2025-10-20 7503856d40 cmd/go: inject loaderstate into matcher function + 2025-10-20 d57c3fd743 cmd/go: inject State parameter into `work.runInstall` + 2025-10-20 e94a5008f6 cmd/go: inject State parameter into `work.runBuild` + 2025-10-20 d9e6f95450 cmd/go: inject State parameter into `workcmd.runSync` + 2025-10-20 9769a61e64 cmd/go: inject State parameter into `modget.runGet` + 2025-10-20 f859799ccf cmd/go: inject State parameter into `modcmd.runVerify` + 2025-10-20 0f820aca29 cmd/go: inject State parameter into `modcmd.runVendor` + 2025-10-20 92aa3e9e98 cmd/go: inject State parameter into `modcmd.runInit` + 2025-10-20 e176dff41c cmd/go: inject State parameter into `modcmd.runDownload` + 2025-10-20 e7c66a58d5 cmd/go: inject State parameter into `toolchain.Select` + 2025-10-20 4dc3dd9a86 cmd/go: add loaderstate to Switcher + 2025-10-20 bcf7da1595 cmd/go: convert functions to methods + 2025-10-20 0d3044f965 cmd/go: make Reset work with any State instance + 2025-10-20 386d81151d cmd/go: make setState work with any State instance + 2025-10-20 a420aa221e cmd/go: inject State parameter into `tool.runTool` + 2025-10-20 441e7194a4 cmd/go: inject State parameter into `test.runTest` + 2025-10-20 35e8309be2 cmd/go: inject State parameter into `list.runList` + 2025-10-20 29a81624f7 cmd/go: inject state parameter into `fmtcmd.runFmt` + 2025-10-20 f7eaea02fd cmd/go: inject state parameter into `clean.runClean` + 2025-10-20 58a8fdb6cf cmd/go: inject State parameter into `bug.runBug` + 2025-10-20 8d0bef7ffe runtime: add linkname documentation and guidance + 2025-10-20 3e43f48cb6 encoding/asn1: use reflect.TypeAssert to improve performance + 2025-10-20 4ad5585c2c runtime: fix _rt0_ppc64x_lib on aix + 2025-10-17 a5f55a441e cmd/fix: add modernize and inline analyzers + 2025-10-17 80876f4b42 cmd/go/internal/vet: tweak help doc + 2025-10-17 b5aefe07e5 all: remove unnecessary loop variable copies in tests + 2025-10-17 5137c473b6 go/types, types2: remove references to under function in comments + 2025-10-17 dbbb1bfc91 all: correct name for comments + 2025-10-17 0983090171 encoding/pem: properly decode strange PEM data + 2025-10-17 36863d6194 runtime: unify riscv64 library entry point + 2025-10-16 0c14000f87 go/types, types2: remove under(Type) in favor of Type.Underlying() + 2025-10-16 1099436f1b go/types, types2: change and enforce lifecycle of Named.fromRHS and Named.underlying fields + 2025-10-16 41f5659347 go/types, types2: remove superfluous unalias call (minor cleanup) + 2025-10-16 e7351c03c8 runtime: use DC ZVA instead of its encoding in WORD in arm64 memclr + 2025-10-16 6cbe0920c4 cmd: update to x/tools@7d9453cc + 2025-10-15 45eee553e2 cmd/internal/obj: move ARM64RegisterExtension from cmd/asm/internal/arch + 2025-10-15 27f9a6705c runtime: increase repeat count for alloc test + 2025-10-15 b68cebd809 net/http/httptest: record failed ResponseWriter writes + 2025-10-15 f1fed742eb cmd: fix three printf problems reported by newest vet + 2025-10-15 0984dcd757 cmd/compile: fix an error in comments + 2025-10-15 31f82877e8 go/types, types2: fix misleading internal comment + 2025-10-15 6346349f56 cmd/compile: replace angle brackets with square + 2025-10-15 284379cdfc cmd/compile: remove rematerializable values from live set across calls + 2025-10-15 519ae514ab cmd/compile: eliminate bound check for slices of the same length + 2025-10-15 b5a29cca48 cmd/distpack: add fix tool to inventory + 2025-10-15 bb5eb51715 runtime/pprof: fix errors in pprof_test + 2025-10-15 5c9a26c7f8 cmd/compile: use arm64 neon in LoweredMemmove/LoweredMemmoveLoop + 2025-10-15 61d1ff61ad cmd/compile: use block starting position for phi line number + 2025-10-15 5b29875c8e cmd/go: inject State parameter into `run.runRun` + 2025-10-15 5113496805 runtime/pprof: skip flaky test TestProfilerStackDepth/heap for now + 2025-10-15 36086e85f8 cmd/go: create temporary cleanup script + 2025-10-14 7056c71d32 cmd/compile: disable use of new saturating float-to-int conversions + 2025-10-14 6d5b13793f Revert "cmd/compile: make 386 float-to-int conversions match amd64" + 2025-10-14 bb2a14252b Revert "runtime: adjust softfloat corner cases to match amd64/arm64" + 2025-10-14 3bc9d9fa83 Revert "cmd/compile: make wasm match other platforms for FP->int32/64 conversions" + 2025-10-14 ee5af46172 encoding/json: avoid misleading errors under goexperiment.jsonv2 + 2025-10-14 11d3d2f77d cmd/internal/obj/arm64: add support for PAC instructions + 2025-10-14 4dbf1a5a4c cmd/compile/internal/devirtualize: do not track assignments to non-PAUTO + 2025-10-14 0ddb5ed465 cmd/compile/internal/devirtualize: use FatalfAt instead of Fatalf where possible + 2025-10-14 0a239bcc99 Revert "net/url: disallow raw IPv6 addresses in host" + 2025-10-14 5a9ef44bc0 cmd/compile/internal/devirtualize: fix OCONVNOP assertion + 2025-10-14 3765758b96 go/types, types2: minor cleanup (remove TODO) + 2025-10-14 f6b9d56aff crypto/internal/fips140/entropy: fix benign race + 2025-10-14 60f6d2f623 crypto/internal/fips140/entropy: support SHA-384 sizes for ACVP tests + 2025-10-13 6fd8e88d07 encoding/json/v2: restrict presence of default options + 2025-10-13 1abc6b0204 go/types, types2: permit type cycles through type parameter lists + 2025-10-13 9fdd6904da strconv: add tests that Java once mishandled + 2025-10-13 9b8742f2e7 cmd/compile: don't depend on arch-dependent conversions in the compiler + 2025-10-13 0e64ee1286 encoding/json/v2: report EOF for top-level values in UnmarshalDecode + 2025-10-13 6bcd97d9f4 all: replace calls to errors.As with errors.AsType + 2025-10-11 1cd71689f2 crypto/x509: rework fix for CVE-2025-58187 + 2025-10-11 8aa1efa223 cmd/link: in TestFallocate, only check number of blocks on Darwin + 2025-10-10 b497a29d25 encoding/json: fix regression in quoted numbers under goexperiment.jsonv2 + 2025-10-10 48bb7a6114 cmd/compile: repair bisection behavior for float-to-unsigned conversion + 2025-10-10 e8a53538b4 runtime: fail TestGoroutineLeakProfile on data race + 2025-10-10 e3be2d1b2b net/url: disallow raw IPv6 addresses in host + 2025-10-10 aced4c79a2 net/http: strip request body headers on POST to GET redirects + 2025-10-10 584a89fe74 all: omit unnecessary reassignment + 2025-10-10 69e8279632 net/http: set cookie host to Request.Host when available + 2025-10-10 6f4c63ba63 cmd/go: unify "go fix" and "go vet" + 2025-10-10 955a5a0dc5 runtime: support arm64 Neon in async preemption + 2025-10-10 5368e77429 net/http: run TestRequestWriteTransport with fake time to avoid flakes + 2025-10-09 c53cb642de internal/buildcfg: enable greenteagc experiment for loong64 + 2025-10-09 954fdcc51a cmd/compile: declare no output register for loong64 LoweredAtomic{And,Or}32 ops + 2025-10-09 19a30ea3f2 cmd/compile: call generated size-specialized malloc functions directly + 2025-10-09 80f3bb5516 reflect: remove timeout in TestChanOfGC + 2025-10-09 9db7e30bb4 net/url: allow IP-literals with IPv4-mapped IPv6 addresses + 2025-10-09 8d810286b3 cmd/compile: make wasm match other platforms for FP->int32/64 conversions + 2025-10-09 b9f3accdcf runtime: adjust softfloat corner cases to match amd64/arm64 + 2025-10-09 78d75b3799 cmd/compile: make 386 float-to-int conversions match amd64 + 2025-10-09 0e466a8d1d cmd/compile: modify float-to-[u]int so that amd64 and arm64 match + 2025-10-08 4837fbe414 net/http/httptest: check whether response bodies are allowed + 2025-10-08 ee163197a8 path/filepath: return cleaned path from Rel + 2025-10-08 de9da0de30 cmd/compile/internal/devirtualize: improve concrete type analysis + 2025-10-08 ae094a1397 crypto/internal/fips140test: make entropy file pair names match + 2025-10-08 941e5917c1 runtime: cleanup comments from asm_ppc64x.s improvements + 2025-10-08 d945600d06 cmd/gofmt: change -d to exit 1 if diffs exist + 2025-10-08 d4830c6130 cmd/internal/obj: fix Link.Diag printf errors + 2025-10-08 e1ca1de123 net/http: format pprof.go + 2025-10-08 e5d004c7a8 net/http: update HTTP/2 documentation to reference new config features + 2025-10-08 97fd6bdecc cmd/compile: fuse NaN checks with other comparisons + 2025-10-07 78b43037dc cmd/go: refactor usage of `workFilePath` + 2025-10-07 bb1ca7ae81 cmd/go, testing: add TB.ArtifactDir and -artifacts flag + 2025-10-07 1623927730 cmd/go: refactor usage of `requirements` + 2025-10-07 a1661e776f Revert "crypto/internal/fips140/subtle: add assembly implementation of xorBytes for mips64x" + 2025-10-07 cb81270113 Revert "crypto/internal/fips140/subtle: add assembly implementation of xorBytes for mipsx" + 2025-10-07 f2d0d05d28 cmd/go: refactor usage of `MainModules` + 2025-10-07 f7a68d3804 archive/tar: set a limit on the size of GNU sparse file 1.0 regions + 2025-10-07 463165699d net/mail: avoid quadratic behavior in mail address parsing + 2025-10-07 5ede095649 net/textproto: avoid quadratic complexity in Reader.ReadResponse + 2025-10-07 5ce8cd16f3 encoding/pem: make Decode complexity linear + 2025-10-07 f6f4e8b3ef net/url: enforce stricter parsing of bracketed IPv6 hostnames + 2025-10-07 7dd54e1fd7 runtime: make work.spanSPMCs.all doubly-linked + 2025-10-07 3ee761739b runtime: free spanQueue on P destroy + 2025-10-07 8709a41d5e encoding/asn1: prevent memory exhaustion when parsing using internal/saferio + 2025-10-07 9b9d02c5a0 net/http: add httpcookiemaxnum GODEBUG option to limit number of cookies parsed + 2025-10-07 3fc4c79fdb crypto/x509: improve domain name verification + 2025-10-07 6e4007e8cf crypto/x509: mitigate DoS vector when intermediate certificate contains DSA public key + 2025-10-07 6f7926589d cmd/go: refactor usage of `modRoots` + 2025-10-07 11d5484190 runtime: fix self-deadlock on sbrk platforms + 2025-10-07 2e52060084 cmd/go: refactor usage of `RootMode` + 2025-10-07 f86ddb54b5 cmd/go: refactor usage of `ForceUseModules` + 2025-10-07 c938051dd0 Revert "cmd/compile: redo arm64 LR/FP save and restore" + 2025-10-07 6469954203 runtime: assert p.destroy runs with GC not running + 2025-10-06 4c0fd3a2b4 internal/goexperiment: remove the synctest GOEXPERIMENT + 2025-10-06 c1e6e49d5d fmt: reduce Errorf("x") allocations to match errors.New("x") + 2025-10-06 7fbf54bfeb internal/buildcfg: enable greenteagc experiment by default + 2025-10-06 7bfeb43509 cmd/go: refactor usage of `initialized` + 2025-10-06 1d62e92567 test/codegen: make sure assignment results are used. + 2025-10-06 4fca79833f runtime: delete redundant code in the page allocator + 2025-10-06 719dfcf8a8 cmd/compile: redo arm64 LR/FP save and restore + 2025-10-06 f3312124c2 runtime: remove batching from spanSPMC free + 2025-10-06 24416458c2 cmd/go: export type State + 2025-10-06 c2fb15164b testing/synctest: remove Run + 2025-10-06 ac2ec82172 runtime: bump thread count slack for TestReadMetricsSched + 2025-10-06 e74b224b7c crypto/tls: streamline BoGo testing w/ -bogo-local-dir + 2025-10-06 3a05e7b032 spec: close tag + 2025-10-03 2a71af11fc net/url: improve URL docs + 2025-10-03 ee5369b003 cmd/link: add LIBRARY statement only with -buildmode=cshared + 2025-10-03 1bca4c1673 cmd/compile: improve slicemask removal + 2025-10-03 38b26f29f1 cmd/compile: remove stores to unread parameters + 2025-10-03 003b5ce1bc cmd/compile: fix SIMD const rematerialization condition + 2025-10-03 d91148c7a8 cmd/compile: enhance prove to infer bounds in slice len/cap calculations + 2025-10-03 20c9377e47 cmd/compile: enhance the chunked indexing case to include reslicing + 2025-10-03 ad3db2562e cmd/compile: handle rematerialized op for incompatible reg constraint + 2025-10-03 18cd4a1fc7 cmd/compile: use the right type for spill slot + 2025-10-03 1caa95acfa cmd/compile: enhance prove to deal with double-offset IsInBounds checks + 2025-10-03 ec70d19023 cmd/compile: rewrite to elide Slicemask from len==c>0 slicing + 2025-10-03 10e7968849 cmd/compile: accounts rematerialize ops's output reginfo + 2025-10-03 ab043953cb cmd/compile: minor tweak for race detector + 2025-10-03 ebb72bef44 cmd/compile: don't treat devel compiler as a released compiler + 2025-10-03 c54dc1418b runtime: support valgrind (but not asan) in specialized malloc functions + 2025-10-03 a7917eed70 internal/buildcfg: enable specializedmalloc experiment + 2025-10-03 630799c6c9 crypto/tls: add flag to render HTML BoGo report Change-Id: I6bf904c523a77ee7d3dea9c8ae72292f8a5f2ba5
2025-11-11[dev.simd] cmd/compile: add masked merging ops and optimizationsJunyang Shao
This CL generates optimizations for masked variant of AVX512 instructions for patterns: x.Op(y).Merge(z, mask) => OpMasked(z, x, y mask), where OpMasked is resultInArg0. Change-Id: Ife7ccc9ddbf76ae921a085bd6a42b965da9bc179 Reviewed-on: https://go-review.googlesource.com/c/go/+/718160 Reviewed-by: David Chase <drchase@google.com> TryBot-Bypass: Junyang Shao <shaojunyang@google.com>
2025-11-10[dev.simd] simd, cmd/compile: remove move from APIJunyang Shao
These should really be machine ops only. Change-Id: Idcc611719eff068153d88c5162dd2e0883e5e0ca Reviewed-on: https://go-review.googlesource.com/c/go/+/717821 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-04[dev.simd] simd/_gen: fix sorting ops slicesAlexander Musman
Fix sorting slices to avoid panic when there are more opsDataImm than opsData (the problem occurs when generating only a subset of instructions but it may be better to keep them sorted by their own names anyway). Change-Id: Iea7fe61259e8416f16c46158d87c84b1d7a3076d Reviewed-on: https://go-review.googlesource.com/c/go/+/716121 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> Auto-Submit: Junyang Shao <shaojunyang@google.com>
2025-10-30cmd/compile: implement bits.Mul64 on 32-bit systemsRuss Cox
This CL implements Mul64uhilo, Hmul64, Hmul64u, and Avg64u on 32-bit systems, with the effect that constant division of both int64s and uint64s can now be emitted directly in all cases, and also that bits.Mul64 can be intrinsified on 32-bit systems. Previously, constant division of uint64s by values 0 ≤ c ≤ 0xFFFF were implemented as uint32 divisions by c and some fixup. After expanding those smaller constant divisions, the code for i/999 required: (386) 7 mul, 10 add, 2 sub, 3 rotate, 3 shift (104 bytes) (arm) 7 mul, 9 add, 3 sub, 2 shift (104 bytes) (mips) 7 mul, 10 add, 5 sub, 6 shift, 3 sgtu (176 bytes) For that much code, we might as well use a full 64x64->128 multiply that can be used for all divisors, not just small ones. Having done that, the same i/999 now generates: (386) 4 mul, 9 add, 2 sub, 2 or, 6 shift (112 bytes) (arm) 4 mul, 8 add, 2 sub, 2 or, 3 shift (92 bytes) (mips) 4 mul, 11 add, 3 sub, 6 shift, 8 sgtu, 4 or (196 bytes) The size increase on 386 is due to a few extra register spills. The size increase on mips is due to add-with-carry being hard. The new approach is more general, letting us delete the old special case and guarantee that all int64 and uint64 divisions by constants are generated directly on 32-bit systems. This especially speeds up code making heavy use of bits.Mul64 with a constant argument, which happens in strconv and various crypto packages. A few examples are benchmarked below. pkg: cmd/compile/internal/test benchmark \ host local linux-amd64 s7 linux-386 s7:GOARCH=386 vs base vs base vs base vs base vs base DivconstI64 ~ ~ ~ -49.66% -21.02% ModconstI64 ~ ~ ~ -13.45% +14.52% DivisiblePow2constI64 ~ ~ ~ +0.97% -1.32% DivisibleconstI64 ~ ~ ~ -20.01% -48.28% DivisibleWDivconstI64 ~ ~ -1.76% -38.59% -42.74% DivconstU64/3 ~ ~ ~ -13.82% -4.09% DivconstU64/5 ~ ~ ~ -14.10% -3.54% DivconstU64/37 -2.07% -4.45% ~ -19.60% -9.55% DivconstU64/1234567 ~ ~ ~ -61.55% -56.93% ModconstU64 ~ ~ ~ -6.25% ~ DivisibleconstU64 ~ ~ ~ -2.78% -7.82% DivisibleWDivconstU64 ~ ~ ~ +4.23% +2.56% pkg: math/bits benchmark \ host s7 linux-amd64 linux-386 s7:GOARCH=386 vs base vs base vs base vs base Add ~ ~ ~ ~ Add32 +1.59% ~ ~ ~ Add64 ~ ~ ~ ~ Add64multiple ~ ~ ~ ~ Sub ~ ~ ~ ~ Sub32 ~ ~ ~ ~ Sub64 ~ ~ -9.20% ~ Sub64multiple ~ ~ ~ ~ Mul ~ ~ ~ ~ Mul32 ~ ~ ~ ~ Mul64 ~ ~ -41.58% -53.21% Div ~ ~ ~ ~ Div32 ~ ~ ~ ~ Div64 ~ ~ ~ ~ pkg: strconv benchmark \ host s7 linux-amd64 linux-386 s7:GOARCH=386 vs base vs base vs base vs base ParseInt/Pos/7bit ~ ~ -11.08% -6.75% ParseInt/Pos/26bit ~ ~ -13.65% -11.02% ParseInt/Pos/31bit ~ ~ -14.65% -9.71% ParseInt/Pos/56bit -1.80% ~ -17.97% -10.78% ParseInt/Pos/63bit ~ ~ -13.85% -9.63% ParseInt/Neg/7bit ~ ~ -12.14% -7.26% ParseInt/Neg/26bit ~ ~ -14.18% -9.81% ParseInt/Neg/31bit ~ ~ -14.51% -9.02% ParseInt/Neg/56bit ~ ~ -15.79% -9.79% ParseInt/Neg/63bit ~ ~ -15.68% -11.07% AppendFloat/Decimal ~ ~ -7.25% -12.26% AppendFloat/Float ~ ~ -15.96% -19.45% AppendFloat/Exp ~ ~ -13.96% -17.76% AppendFloat/NegExp ~ ~ -14.89% -20.27% AppendFloat/LongExp ~ ~ -12.68% -17.97% AppendFloat/Big ~ ~ -11.10% -16.64% AppendFloat/BinaryExp ~ ~ ~ ~ AppendFloat/32Integer ~ ~ -10.05% -10.91% AppendFloat/32ExactFraction ~ ~ -8.93% -13.00% AppendFloat/32Point ~ ~ -10.36% -14.89% AppendFloat/32Exp ~ ~ -9.88% -13.54% AppendFloat/32NegExp ~ ~ -10.16% -14.26% AppendFloat/32Shortest ~ ~ -11.39% -14.96% AppendFloat/32Fixed8Hard ~ ~ ~ -2.31% AppendFloat/32Fixed9Hard ~ ~ ~ -7.01% AppendFloat/64Fixed1 ~ ~ -2.83% -8.23% AppendFloat/64Fixed2 ~ ~ ~ -7.94% AppendFloat/64Fixed3 ~ ~ -4.07% -7.22% AppendFloat/64Fixed4 ~ ~ -7.24% -7.62% AppendFloat/64Fixed12 ~ ~ -6.57% -4.82% AppendFloat/64Fixed16 ~ ~ -4.00% -5.81% AppendFloat/64Fixed12Hard -2.22% ~ -4.07% -6.35% AppendFloat/64Fixed17Hard -2.12% ~ ~ -3.79% AppendFloat/64Fixed18Hard -1.89% ~ +2.48% ~ AppendFloat/Slowpath64 -1.85% ~ -14.49% -18.21% AppendFloat/SlowpathDenormal64 ~ ~ -13.08% -19.41% pkg: crypto/internal/fips140/nistec/fiat benchmark \ host s7 linux-amd64 linux-386 s7:GOARCH=386 vs base vs base vs base vs base Mul/P224 ~ ~ -29.95% -39.60% Mul/P384 ~ ~ -37.11% -63.33% Mul/P521 ~ ~ -26.62% -12.42% Square/P224 +1.46% ~ -40.62% -49.18% Square/P384 ~ ~ -45.51% -69.68% Square/P521 +90.37% ~ -25.26% -11.23% (The +90% is a separate problem and not real; that much variation can be seen on that system by running the same binary from two different files.) pkg: crypto/internal/fips140/edwards25519 benchmark \ host s7 linux-amd64 linux-386 s7:GOARCH=386 vs base vs base vs base vs base EncodingDecoding ~ ~ -34.67% -35.75% ScalarBaseMult ~ ~ -31.25% -30.29% ScalarMult ~ ~ -33.45% -32.54% VarTimeDoubleScalarBaseMult ~ ~ -33.78% -33.68% Change-Id: Id3c91d42cd01def6731b755e99f8f40c6ad1bb65 Reviewed-on: https://go-review.googlesource.com/c/go/+/716061 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Russ Cox <rsc@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
2025-10-26cmd/compile: use MOV(D|F) with const for Const(64|32)F on riscv64Meng Zhuo
The original Const64F using: AUIPC + LD + FMVDX to load float64 const, we can use AUIPC + FLD instead, same as Const32F. Change-Id: I8ca0a0e90d820a26e69b74cd25df3cc662132bf7 Reviewed-on: https://go-review.googlesource.com/c/go/+/703215 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Joel Sing <joel@sing.id.au> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2025-10-24[dev.simd] cmd/compile, simd: add SHA featuresJunyang Shao
This CL also fixed some bugs left in CL 712181. Change-Id: I9cb6cd9fbaef307f352809bf21b8fec3eb62721a Reviewed-on: https://go-review.googlesource.com/c/go/+/712361 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-10-22[dev.simd] cmd/compile, simd: add definitions for VPTERNLOG[DQ]David Chase
This includes an non-public intrinsic for testing, and a test. Optimizations using this instruction will follow in another CL. Change-Id: I7f7a93212249a16a30bd1379c717f8a7f9915daf Reviewed-on: https://go-review.googlesource.com/c/go/+/708995 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
2025-10-15cmd/compile: use arm64 neon in LoweredMemmove/LoweredMemmoveLoopVasily Leonenko
Raspberry Pi 5 (Cortex-A76) │ base.log │ opt.log │ │ sec/op │ sec/op vs base │ MemmoveKnownSize112 3.549n ± 0% 3.652n ± 0% +2.92% (p=0.000 n=10) MemmoveKnownSize128 3.979n ± 0% 3.617n ± 0% -9.09% (p=0.000 n=10) MemmoveKnownSize192 7.566n ± 0% 5.074n ± 0% -32.94% (p=0.000 n=10) MemmoveKnownSize248 8.549n ± 0% 7.184n ± 1% -15.97% (p=0.000 n=10) MemmoveKnownSize256 10.010n ± 0% 6.827n ± 0% -31.80% (p=0.000 n=10) MemmoveKnownSize512 19.81n ± 0% 13.59n ± 0% -31.40% (p=0.000 n=10) MemmoveKnownSize1024 39.66n ± 0% 27.00n ± 0% -31.93% (p=0.000 n=10) geomean 9.538n 7.392n -22.50% Change-Id: I7b17408cd0a500ceaa80bc93ffe2f19ddeea9c0d Reviewed-on: https://go-review.googlesource.com/c/go/+/692315 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-10-14Revert "cmd/compile: make 386 float-to-int conversions match amd64"David Chase
This reverts commit 78d75b37992be01326b9bd2666195aaba9bf2ae2. Reason for revert: we need to do this more carefully, at minimum gated by a module version (This should follow the softfloat FP conversion revert) Change-Id: I736bec6cd860285dcc3b11fac85b377a149435c3 Reviewed-on: https://go-review.googlesource.com/c/go/+/711842 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com>
2025-10-14Revert "cmd/compile: make wasm match other platforms for FP->int32/64 ↵David Chase
conversions" This reverts commit 8d810286b3121b601480426159c04d178fa29166. Reason for revert: we need to do this more carefully, at minimum gated by a module version Change-Id: Ia951e2e5ecdd455ea0f17567963c6fab0f4540dc Reviewed-on: https://go-review.googlesource.com/c/go/+/711840 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org>
2025-10-14[dev.simd] cmd/compile, simd: update DotProd to DotProductJunyang Shao
API naming changes. This CL also remove AddDotProductPairsSaturated. Change-Id: I02e6d45268704f3ed4eaf62f0ecb7dc936b42124 Reviewed-on: https://go-review.googlesource.com/c/go/+/710935 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>