go/test/codegen/simd.go
Cherry Mui 4b37aa2bc1 [dev.simd] all: merge master (bfbbe96) into dev.simd
Updated internal/runtime/maps/memhash_aes_simd.go to use the
newly renamed Load functions.

Conflicts:

- src/cmd/compile/internal/amd64/simdssa.go
- src/cmd/compile/internal/ssa/_gen/AMD64.rules
- src/cmd/compile/internal/ssa/_gen/ARM64.rules
- src/cmd/compile/internal/ssa/_gen/simdAMD64.rules
- src/cmd/compile/internal/ssa/_gen/simdAMD64ops.go
- src/cmd/compile/internal/ssa/rewriteAMD64.go
- src/cmd/compile/internal/ssagen/intrinsics.go
- src/cmd/compile/internal/types2/stdlib_test.go
- src/go/types/stdlib_test.go
- src/internal/buildcfg/exp.go
- test/codegen/simd.go

Merge List:

+ 2026-05-22 bfbbe9667e runtime: remove unreachable code in malloc_generated.go
+ 2026-05-22 99675026a7 internal/strconv: fix mishandling of long outputs
+ 2026-05-22 fc245b6427 syscall: add export linknames for socketcall on S390X
+ 2026-05-22 cc623858f6 runtime/pprof: update test's expected frame count
+ 2026-05-21 e4283592e5 fmt: give advice on wrapper functions
+ 2026-05-21 1bcea1df64 cmd/{vet,fix}: use new constants from /x/tools/go/analysis/suite
+ 2026-05-21 60f0ced65b internal/testenv: make MustHaveSource detect missing source
+ 2026-05-21 e0a8616941 math/rand/v2: add method Rand.N
+ 2026-05-21 8621461b26 cmd: update vendored x/arch
+ 2026-05-21 0db3804845 archive/zip: turn off large zip test on 32-bit archs
+ 2026-05-21 abdc5da461 simd/archsimd/_gen: annotate text/template usage
+ 2026-05-21 661e0c610e internal/strconv: work around escape analysis bug
+ 2026-05-20 04ed01963e runtime/trace: remove unused runtime_readTrace declaration
+ 2026-05-20 e2c188568d cmd/compile: compute embedded field offset in static initialization
+ 2026-05-20 dd1da37fa4 runtime: always call slowpath for heap bits in span
+ 2026-05-20 5a1c0ee6de test/fixedbugs: minor adjustments to line-directive specific tests
+ 2026-05-20 78f63eb790 crypto/internal/cryptotest/wycheproof: avoid reading go.sum at test time
+ 2026-05-20 244c8ae4c8 crypto/internal/fips140/nistec: avoid some mul64 in p256 calculations
+ 2026-05-20 2c659bb4db crypto/internal/fips140/nistec: optimize P-256 scalar fiat implementation
+ 2026-05-20 e4e6887cee crypto/internal/fips140/nistec: mechanically improve P-256 scalar fiat code
+ 2026-05-20 be35de22f1 crypto/internal/fips140/nistec: replace P-256 scalar assembly with fiat
+ 2026-05-20 91a81e5ae1 go/types,cmd/compile/internal/types2: add String methods
+ 2026-05-20 bbf60f3bbd all: update to x/tools@b38156a7
+ 2026-05-20 f571fc93b0 encoding/json: clarify that v1 Unmarshal calls UnmarshalerFrom methods
+ 2026-05-20 c700213f6c encoding/json/jsontext: expand Decoder.UnreadBuffer documentation
+ 2026-05-20 4a38094e42 database/sql: add RowsColumnScanner, expose ConvertAssign
+ 2026-05-20 4dde0f6c36 all: use linknamestd for new linknames
+ 2026-05-20 6a002d1474 cmd/dist: pass -std to assembler
+ 2026-05-20 694604e524 runtime: further reduce number of size classes
+ 2026-05-20 3652f299a8 cmd/link: skip TestAbstractOriginSanity
+ 2026-05-20 05ab7b8da5 cmd/compile/internal/syntax: refactor/reword new line directives tests
+ 2026-05-20 c0bd270406 net/netip: update godoc comments
+ 2026-05-20 acced3df03 crypto/internal/fips140/edwards25519/field: delete Square amd64 assembly
+ 2026-05-20 a00bbab762 crypto/internal/fips140/edwards25519/field: speed up add chains
+ 2026-05-20 1926d1d95d cmd/compile: clarify relativity of a simple file name in a line directive
+ 2026-05-20 3a9c8e1d90 archive/zip: fix writer-side Zip64 edge cases
+ 2026-05-20 a7ea4a7ecd cmd/compile/internal/syntax: resolve //line filenames relative to source directory
+ 2026-05-20 b8246db0c3 cmd/go/internal/clean: print all removals
+ 2026-05-20 96db4cf31f cmd/go/internal/clean: forget about makefiles
+ 2026-05-20 8a69bfb1bb archive/zip: fix reader-side Zip64 edge cases
+ 2026-05-20 8b672822b2 internal/profile: return error from gzip.Writer.Close in Profile.Write
+ 2026-05-20 c410b4944e runtime: remove duplicated code in no scan slow path
+ 2026-05-20 2f0459745c cmd/compile: make ReassignOracle StaticValue unwrap parens
+ 2026-05-20 1bcfdf2df2 cmd/compile: switch to ReassignOracle.StaticValue in escape call analysis
+ 2026-05-20 84e0c4965a cmd/compile: move FuncAssignments into ReassignOracle
+ 2026-05-20 5af294bac7 cmd/compile: handle multiply-assigned func vars in escape analysis
+ 2026-05-20 3c05d2a519 debug/pe: add FuzzReader
+ 2026-05-20 71300e8011 internal/strconv: use fast unrounded scaling for floating-point
+ 2026-05-20 fd7a0e680d cmd: update golang.org/x/arch for riscv64 disassembler
+ 2026-05-20 c3f7d75877 internal/poll: omit embedded type field in splicePipe construction
+ 2026-05-20 4136ffed69 simd/archsimd: decode non-broadcast memory operands
+ 2026-05-20 856c405c4f internal/cpu: correcting spelling errors in the comments
+ 2026-05-20 b9c5520dbc encoding/json: clarify that v1 Marshal calls MarshalerTo methods
+ 2026-05-20 a40c232e81 crypto/x509: skip TestReadUniqueDirectoryEntries if symlinks unsupported
+ 2026-05-20 7eeacc9cce net/netip: remove incorrect comment in Prefix.AppendTo
+ 2026-05-20 4a6d3a3b46 cmd/go/internal/envcmd: report GOPACKAGESDRIVER
+ 2026-05-20 6c8731962d runtime: have patience for trailing thread in contention test
+ 2026-05-20 b99b8feaae runtime: split gp.m.locks bits for lock vs acquirem
+ 2026-05-19 47f26133bd cmd/internal/obj/loong64: add ll.acq.{w,d}, sc.rel.{w,d}, sc.q instruction
+ 2026-05-19 45f1313c18 go/types: generate alias_test.go from respective types2 source
+ 2026-05-19 8494d25c4c os/signal: make NotifyContext Cause match context.Canceled
+ 2026-05-19 37bce6617f types2, go/types: add missing alias test to types2, simplify go/types test
+ 2026-05-19 2760c3f5a3 go/types: use mustParse helper to simplify tests where possible
+ 2026-05-19 b12ed667d9 crypto/ecdsa: test hash size restrictions
+ 2026-05-19 8329d31307 runtime/loong64: use ABIInternal convention in cgocallbackg
+ 2026-05-19 f93504bfd6 cmd/internal/obj/loong64: add FRINT{F,D} instructions
+ 2026-05-19 15f44ffcc3 runtime: skip gcBlackenEnabled check and gcmarknewobject in fast path
+ 2026-05-19 2a93576965 interrnal/buildcfg: enable SizeSpecializedMalloc by default
+ 2026-05-19 b7ad0fe092 all: use SkipObjectResolution mode in parser.ParseFile calls where possible
+ 2026-05-19 8ddf0031cf cmd/compile: disallow nointerface method satisfying type constraint
+ 2026-05-19 063f8b07c1 crypto/tls: fix broken quic_test.go
+ 2026-05-19 24e654197a runtime: add benchmarks for allocating slices of pointers
+ 2026-05-19 1dd2bef375 runtime/secret: fix cgo crashes inside of secret.Do
+ 2026-05-19 c8b14e157f math/big: only use pool for large allocations
+ 2026-05-19 aee6009ba5 cmd/link: check linkname access to assembly symbols
+ 2026-05-19 ad46b4815e crypto/tls: clamp effective minimum version to TLS 1.3 when using QUIC
+ 2026-05-19 edf006c9a3 net/mail: escape arbitrary input when including them in errors
+ 2026-05-19 0db7bea636 cmd/dist: fix JSON processing of trailing bytes
+ 2026-05-19 5563d58a15 go/printer: update comments and simplify test (cleanup)
+ 2026-05-19 c07a0f09b8 doc: document new ppc64/linux features
+ 2026-05-19 4b77d329ea encoding/json/v2: add string option hint optimization
+ 2026-05-19 469636308b encoding/json/jsontext: drop duplicate import
+ 2026-05-19 83b29183af crypto/internal/fips140/rsa: add large exponent OAEP for ACVP
+ 2026-05-19 7f4f2c1c7b crypto/ecdsa: check the hash length in PrivateKey.Sign
+ 2026-05-19 2f9a9642e1 crypto/ecdsa: reject empty hashes
+ 2026-05-19 1debc9f0ce crypto/tls: surface private key parsing error from X509KeyPair
+ 2026-05-19 18f72b3842 crypto/tls: add a test for running with broken certificates
+ 2026-05-19 2f57f7626e crypto/tls: remove the x509keypairleaf GODEBUG setting
+ 2026-05-19 1634ae8c7c crypto/tls: remove the tls10server GODEBUG setting
+ 2026-05-19 0f4862de57 crypto/tls: remove tls3des GODEBUG setting
+ 2026-05-19 14a4bc2051 crypto/tls: remove tlsrsakex GODEBUG setting
+ 2026-05-19 a7bc19bf37 crypto/tls: remove the tlsunsafeekm GODEBUG setting
+ 2026-05-19 5cc4ceb800 crypto/tls: add TestInvalidHandshakeSignature
+ 2026-05-19 78b71d40fd encoding/json/jsontext: skip allocation test when inlining is disabled
+ 2026-05-19 6b0243ccf6 crypto/tls: implement MLKEM1024 key exchange
+ 2026-05-19 97a57b481f crypto/tls: use mlkem.GenerateKey for ML-KEM hybrids
+ 2026-05-19 27532dc35c crypto/tls: deprecate Config.Rand
+ 2026-05-19 542d7d549f crypto/tls: let Config.CurvePreferences override GODEBUG options
+ 2026-05-19 c9a3e8bbd2 encoding/json/jsontext: skip inline-dependent test on noopt builders
+ 2026-05-19 e01f29f918 crypto/internal/fips140/rsa: check hash length in PKCS#1 v1.5 signatures
+ 2026-05-19 47cc60743b runtime,runtime/cgo: port ios/arm64 working dir setup from C to Go
+ 2026-05-19 95e935b1b3 crypto/tls: update generated certificates
+ 2026-05-19 c74ba7d265 crypto/tls: add ML-DSA support
+ 2026-05-19 003833a138 cmd/link: track content-hashed-ness for cloned symbols
+ 2026-05-19 99623c5a17 crypto/rsa: skip TestKeyGenerationVectors on older FIPS 140-3 modules
+ 2026-05-19 f142be8f2f go/printer: do not indent composite literals in return statements
+ 2026-05-19 4e51025e3e crypto/x509: add ML-DSA support
+ 2026-05-19 d80de8f117 cmd/go: sort subcommands in help output
+ 2026-05-19 4bf23b51b8 crypto/x509: honor SSL_CERT_{FILE,DIR} on windows/darwin
+ 2026-05-19 93da30397d math/big: move Int.Divide and corresponding test function up (cleanup)
+ 2026-05-19 5f47eb0cdf math/big: refactored TestIntDivide tests, added more test cases
+ 2026-05-19 05f75fb9e8 internal/runtime/maps,runtime/: pass keys by value to MemHash{32,64} and StrHash.
+ 2026-05-19 e26a373785 runtime/secret: implement goroutine inheriting secret state
+ 2026-05-19 e73e73470e cmd/compile: improve known bits debug print
+ 2026-05-19 7d2eb15103 net/http/fcgi: handle error returned by w.Close() in writePairs
+ 2026-05-19 880ef11ecf cmd/compile: make computeKnownBitsForShift iteration faster
+ 2026-05-19 fabaedcbe8 cmd/compile: fold == != with a const and a bijective operation into the const
+ 2026-05-19 75560e67c9 runtime: introduce a mallocgc fast path
+ 2026-05-19 6716b79b58 lib/time: update to 2026b/2026b
+ 2026-05-19 2378242315 runtime/_mkmalloc: allow for folding const bool exprs
+ 2026-05-19 e9edbced42 encoding/json/v2: remove recursion and error on `string` on unsupported type
+ 2026-05-19 e8c1e370c9 database/sql: add cursor cancelation test, document some cursor issues
+ 2026-05-19 64315a2d18 bytes, strings: use builtin min function in genSplit
+ 2026-05-19 03d1f8efc8 crypto/rsa: bypass Go+BoringCrypto for small, insecure, flaky keys
+ 2026-05-19 c2ecd421b8 crypto/mlkem: add Wycheproof coverage
+ 2026-05-19 7df2a42f94 crypto: move Wycheproof test coverage from x/crypto
+ 2026-05-19 caa4c72fee crypto/x509: accept non-string pkix.Name attributes
+ 2026-05-19 d2095798a1 crypto/internal/cryptotest: add Wycheproof schema/helpers
+ 2026-05-19 3e1c31701c crypto/ecdsa: add c2sp.org/det-keygen test vectors for ECDSA key generation
+ 2026-05-19 0db36238c6 cmd/internal/obj/x86: shorten MOVQ r64, imm32 for positive immediates
+ 2026-05-19 c888fd67f0 crypto/mldsa: don't precompute PublicKey
+ 2026-05-19 7bc111c6eb crypto/mldsa: new package
+ 2026-05-19 4212586726 cmd/compile/internal/ssa: prefer registers x8-x15/f8-f15 on riscv64
+ 2026-05-19 0c3b9f837d cmd/compile: fix corner case boundedness for oversized shifts
+ 2026-05-18 8f7f951965 math/big: add Int.Divide and RoundingMode aliases
+ 2026-05-18 2677fe9bbe go/constant: add StringLen function
+ 2026-05-18 15fd4ff942 runtime: move post allocation work into postMallocgc
+ 2026-05-18 c7a107bfbf encoding/json/internal/jsontest: rename testdata to _embed
+ 2026-05-18 722ee60825 runtime: combine sizespecializedmalloc small stubs into a single stub
+ 2026-05-18 0a151acad8 runtime: remove race and valgrind cases from specializedmalloc stubs
+ 2026-05-18 b23aea0c94 runtime/_mkmalloc: set position in substituteWithBasicLit
+ 2026-05-18 e212a16d1e internal/buildcfg: flip default of GenericMethods
+ 2026-05-18 21e3cdefc3 cmd/go: simplify go.mod to have at most two require sections
+ 2026-05-18 f3f3d0859a cmd/compile/internal/noder: update UIR to V4
+ 2026-05-18 813b317cc9 net/http/httptest: add NewTestServer with in-memory network
+ 2026-05-18 a871fd3732 internal/nettest: add internal fake networking implementation
+ 2026-05-18 2e67b18935 net/http: fix data race in TestServerNoWriteTimeout/h2
+ 2026-05-18 71c7ea1c6c crypto/internal/fips140/aes/gcm: constant-time GHASH
+ 2026-05-18 c1f0b9bdba go/printer: fix false positive doc comment
+ 2026-05-18 44fde0fd08 crypto/internal/fips140/rsa: add large exponent support for ACVP tests
+ 2026-05-18 3cdb042b2e crypto/rsa: add c2sp.org/det-keygen test vectors for RSA key generation
+ 2026-05-18 5cd903156e crypto/rsa: generate primes ≡ 7 mod 8 and update comments
+ 2026-05-18 2361851aa9 crypto: improve panic message when a hash function is unavailable
+ 2026-05-18 6de59e2070 crypto: return an error if a hash function is not available
+ 2026-05-18 3825609217 crypto/tls: remove a couple FIPS 140-3 mode skip from tests
+ 2026-05-18 aca2bff284 crypto/tls: consistently use testenv.SetGODEBUG in tests
+ 2026-05-18 9578a80f15 crypto/tls: remove old test config and certificates
+ 2026-05-18 907b4be52b crypto/tls: port TestClientAuth to the new certificates
+ 2026-05-18 c78a8273c8 crypto/tls: migrate off legacy testConfig
+ 2026-05-18 ca4f272170 crypto/tls: switch tests to new test certificates and keys
+ 2026-05-18 320e0be23d runtime/pprof: possibly deflake TestGoroutineLeakProfileConcurrency stress tests
+ 2026-05-18 6997bcd820 crypto/x509: add RawSignatureAlgorithm
+ 2026-05-18 e62d3e6e89 internal/buildcfg: enable JSONv2 as baseline
+ 2026-05-18 250d0eb6ee math/big: reduce x1,x2 via subtraction
+ 2026-05-17 69a99fdcbb net/netip: inline single-use Addr.string{4,6,4In6} methods
+ 2026-05-16 9df04115d6 log/slog: document context.Background use in non-Context methods
+ 2026-05-16 4e06ed21ac runtime: throw if a timespec64 can't be converted to a timespec32
+ 2026-05-16 0d54be530b cmd/compile: cleanup ARM64 shift lowering
+ 2026-05-15 9e0467b174 cmd/compile: remove flags → bool → flags roundtrips on amd64
+ 2026-05-15 c6eaf03788 database/sql: run tests with different driver variants
+ 2026-05-15 9be7615aa2 cmd/compile: represent escape analysis callees as a slice
+ 2026-05-15 f4bfb1a9c6 cmd/compile: treat singly-assigned func vars as static in escape analysis
+ 2026-05-15 1a7e601d07 net/textproto: escape arbitrary input when including them in errors
+ 2026-05-15 ab7c8279a0 cmd/compile, runtime: use fine-grained FENCE instructions on riscv64
+ 2026-05-15 212065c922 cmd/compile: shuffle bits.Sub intrinsic generation on amd64
+ 2026-05-15 8bd95ae848 src: fix spelling mistakes
+ 2026-05-14 080a6d5fa8 net/http: disable HTTP/3 tests prior to freeze
+ 2026-05-14 80123ef4bf cmd/compile: preserve pointerness during splitload
+ 2026-05-14 c203e4ecb9 image, image/gif: document DecodeConfig before Decode for untrusted input
+ 2026-05-13 7601c4bf42 net/http/internal/http2: reject STREAM_ENDED + Content-Length request
+ 2026-05-13 c22f92a751 net/http: fix hang in TestTransportClosesBodyOnError/h3
+ 2026-05-13 81f747893d net/netip: fix typo in AddrPort.AppendBinary godoc
+ 2026-05-13 168fe84e6c go/ast: fix godoc links
+ 2026-05-13 364de84f36 all: turn on cgo/external linking for linux/ppc64
+ 2026-05-13 922abf576d cmd/go: add constant for requires simplification
+ 2026-05-12 58efaf3859 cmd/asm, cmd/internal/obj: add zvbb/zvbc for riscv64
+ 2026-05-12 aa3c8ed492 net/http: move TestOmitHTTP2 to cmd/dist
+ 2026-05-12 42bdffec2d cmd/go: force external linking when CGO_LDFLAGS contains static-linking flags
+ 2026-05-12 cd913caa3f cmd/go/internal/telemetrystats: add go/platform/target/port:*-* counter
+ 2026-05-12 a5a336cda2 debug/pe, debug/macho: use saferio.ReadData for ZLIB section decompression
+ 2026-05-12 f552547748 cmd/compile: fixed error message about println says print
+ 2026-05-12 5b106947d1 cmd/compile: propagate desired registers through phi nodes
+ 2026-05-12 55089b9e27 runtime: remove specialized classes larger than 128 bytes
+ 2026-05-12 15129eb73b runtime: add microbenchmarks for sizespecializedmalloc
+ 2026-05-11 9936a78b78 runtime: consolidate tiny sizespecializedmalloc functions
+ 2026-05-11 326e7845a2 all: update to x/net@ad8140e0aa
+ 2026-05-11 358cf41413 cmd/internal/obj/arm: use single BIC for AND with negative-rotated immediate
+ 2026-05-11 11a3b27b91 crypto/hkdf: fix example to derive three different 128-bit keys
+ 2026-05-11 2568174249 runtime: fix TestUsingVDSO on linux/ppc64le
+ 2026-05-10 2403e594a5 internal/runtime/maps: rewrite MemHash{32,64} using simd/archsimd intrinsics
+ 2026-05-08 ce4fc9417c cmd/compile: use inline tree index to identify call stack
+ 2026-05-08 55ff407d4f cmd/internal/obj: print error on duplicate symbol definitions
+ 2026-05-08 e49b53439d cmd/compile/internal/obj/arm64: add RPRFM instruction for range prefetch
+ 2026-05-08 74c35fca7a cmd/compile: canonicalize x+x into x<<1 in generic.rules
+ 2026-05-08 f133609b75 runtime: eliminate false positives in ctrlGroupMatchH2 on ARM64
+ 2026-05-08 816c1a79fb go/importer: un-deprecate importer.ForCompiler
+ 2026-05-08 3f3387fab8 cmd/compile: catch missed case in binary-search-for-switch
+ 2026-05-08 c7d87cda53 runtime/cgo: add acquire/release back around malloc
+ 2026-05-08 373b3a9097 test: update newinline.go for closure name change
+ 2026-05-08 afcf04cb64 internal/goexperiment: actually delete goroutineleakprofile experiment
+ 2026-05-07 e30b75a910 cmd/cgo/internal/testsanitizers: bound ASAN C support probe
+ 2026-05-07 834214f787 runtime: fix TestUsingVDSO on Linux ARMv6 (Pi 1)
+ 2026-05-07 ea0da4047c net/http/internal/http2: close client conn on GOAWAY with no reqs in-flight
+ 2026-05-07 8042aaf03c runtime/maps: only grow small full maps when inserting new keys
+ 2026-05-07 409f784bea cmd/compile: simplify closure name
+ 2026-05-07 1456da550a crypto/tls: add QUICConfig.ClientHelloInfoConn
+ 2026-05-07 fee42ee058 src: spelling and grammar fixes
+ 2026-05-07 8908cc14cc cmd/internal: fix error message
+ 2026-05-07 f2b1b38293 cmd/compile: crash if we try to generate a truncated AMD64 const shift
+ 2026-05-07 c3bfc824a5 cmd/compile: do not misscompile x+x << 63 to x << 0 on amd64
+ 2026-05-07 784ea961a4 runtime: avoid concurrent use of synctest timer race context.
+ 2026-05-07 15b9fc2659 net/http: support non-tls.Conn TLS connections
+ 2026-05-07 887f38afa9 net/http: fix FileServer tests that are racy for HTTP/3
+ 2026-05-07 70634e7d67 net/http: adjust several tests to work for HTTP/3
+ 2026-05-07 4d7ac7ff23 all: update to x/net@689f70a42a
+ 2026-05-07 1a9af07120 cmd/go: reject sumdb response lacking module hash
+ 2026-05-07 788b1c54c1 all: avoid unsafe StringToUTF16Ptr on Windows
+ 2026-05-07 f9f6dc7c82 archive/tar: clarify that tarinsecurepath=0 does not apply to linknames
+ 2026-05-07 2747d887eb compress/flate: clarify compatibility promise
+ 2026-05-07 714a94dd31 cmd/compile/internal/noder: put type args inside parenthesis
+ 2026-05-06 16449179ec internal/goexperiment,runtime: drop goroutineleakprofile experiment
+ 2026-05-06 3b7d571c99 html/template: use zero-alloc bytes.EqualFold
+ 2026-05-06 66843181d1 cmd/go: fix potention deadlock
+ 2026-05-06 b32283b27b cmd/go: fix length is not equal cause bytes.Equal never return true
+ 2026-05-06 caeb5b7b66 cmd/api: fix false positive and false negative in isDeprecated
+ 2026-05-06 deee1b75cf cmd/api/testdata: add test case for issue 79145
+ 2026-05-06 f03f2ab67a go/types: prevent panic with multi-tag, multi-file test packages
+ 2026-05-06 f230dd8a1d mime: avoid quadratic complexity in WordDecoder.DecodeHeader
+ 2026-05-06 eb845eca72 go/types, types2: include type arguments in instantiated type cycle errors
+ 2026-05-06 3cf84263ec runtime: prune tombstones before rehash in fast32 pointer-key insert
+ 2026-05-06 edc5480072 cmd/go: correct go/vcs counter names
+ 2026-05-06 978f00ab7f crypto/x509/pkix: render string-typed attribute values as strings
+ 2026-05-06 253aa2a12a internal/buildcfg: enable goroutineleakprofile GOEXPERIMENT by default
+ 2026-05-06 0b87c1d350 regexp: reimplement API using iterators, revise doc comments
+ 2026-05-06 d5ebe8100d cmd/compile: use binsearch-not-table for simd non-constant immediates when retpoline
+ 2026-05-05 07840ceeed index/suffixarray: fix incorrect condition
+ 2026-05-05 628674a0c1 cmd/compile: schedule increments after flags
+ 2026-05-05 d81ba6c35d runtime: exclude main goroutine blocked on select{} from goroutine leak profile
+ 2026-05-05 19f8047c26 all: update to x/net@5e11a5ab89
+ 2026-05-05 0b54a75319 encoding/json/v2: support `format` tag option behind goexperiment
+ 2026-05-05 d5d2bde748 encoding/json/jsontext: document underlying data storage of Token
+ 2026-05-05 f2a43196d1 encoding/json/jsontext: use custom wrapper type for Token accessor errors
+ 2026-05-05 1bd98fab2c crypto/internal/fips140/drbg: fix Wasm stub
+ 2026-05-05 6f19c3b459 cmd/compile: add missing bound checks when handle zero-sized values
+ 2026-05-04 e929fb78e4 index/suffixarray: protect against another data corruption
+ 2026-05-04 2098279730 index/suffixarray: report error rather than panic for corrupted data
+ 2026-05-04 4e4b780652 cmd/compile/internal/noder: hoist up generic methods assertion

Change-Id: Iecbe9b5fbcd86b4094a839b03aa8f7e0c28275de
2026-05-23 09:08:07 -04:00

147 lines
3.6 KiB
Go

// asmcheck
// Copyright 2025 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// These tests check code generation of simd peephole optimizations.
//go:build goexperiment.simd && amd64
package codegen
import (
"math"
"simd/archsimd"
)
func vptest1() bool {
v1 := archsimd.LoadUint64x2([]uint64{0, 1})
v2 := archsimd.LoadUint64x2([]uint64{0, 0})
// amd64:`VPTEST (.*)(.*)$`
// amd64:`SETCS (.*)$`
return v1.AndNot(v2).IsZero()
}
func vptest2() bool {
v1 := archsimd.LoadUint64x2([]uint64{0, 1})
v2 := archsimd.LoadUint64x2([]uint64{0, 0})
// amd64:`VPTEST (.*)(.*)$`
// amd64:`SETEQ (.*)$`
return v1.And(v2).IsZero()
}
type Args2 struct {
V0 archsimd.Uint8x32
V1 archsimd.Uint8x32
x string
}
//go:noinline
func simdStructNoSpill(a Args2) archsimd.Uint8x32 {
// amd64:-`VMOVDQU .*$`
return a.V0.Xor(a.V1)
}
func simdStructWrapperNoSpill(a Args2) archsimd.Uint8x32 {
// amd64:-`VMOVDQU .*$`
a.x = "test"
return simdStructNoSpill(a)
}
//go:noinline
func simdArrayNoSpill(a [1]Args2) archsimd.Uint8x32 {
// amd64:-`VMOVDQU .*$`
return a[0].V0.Xor(a[0].V1)
}
func simdArrayWrapperNoSpill(a [1]Args2) archsimd.Uint8x32 {
// amd64:-`VMOVDQU .*$`
a[0].x = "test"
return simdArrayNoSpill(a)
}
func simdFeatureGuardedMaskOpt() archsimd.Int16x16 {
var x, y archsimd.Int16x16
if archsimd.X86.AVX512() {
mask := archsimd.Mask16x16FromBits(5)
return x.Add(y).Masked(mask) // amd64:`VPADDW.Z .*$`
}
mask := archsimd.Mask16x16FromBits(5)
return x.Add(y).Masked(mask) // amd64:`VPAND .*$`
}
func simdMaskedMerge() archsimd.Int16x16 {
var x, y archsimd.Int16x16
if archsimd.X86.AVX512() {
mask := archsimd.Mask16x16FromBits(5)
return x.Add(y).Merge(x, mask) // amd64:-`VPBLENDVB .*$`
}
mask := archsimd.Mask16x16FromBits(5)
return x.Add(y).Merge(x, mask) // amd64:`VPBLENDVB .*$`
}
var nan = math.NaN()
var floats64s = []float64{0, 1, 2, nan, 4, nan, 6, 7, 8, 9, 10, 11, nan, 13, 14, 15}
var sinkInt64s = make([]int64, 100)
func simdIsNaN() {
x := archsimd.LoadFloat64x4(floats64s)
y := archsimd.LoadFloat64x4(floats64s[4:])
a := x.IsNaN()
b := y.IsNaN()
// amd64:"VCMPPD [$]3," -"VPOR"
c := a.Or(b)
c.ToInt64x4().Store(sinkInt64s)
}
func simdIsNaN512() {
x := archsimd.LoadFloat64x8(floats64s)
y := archsimd.LoadFloat64x8(floats64s[8:])
a := x.IsNaN()
b := y.IsNaN()
// amd64:"VCMPPD [$]3," -"VPOR"
c := a.Or(b)
c.ToInt64x8().Store(sinkInt64s)
}
func sftImmVPSRL() archsimd.Uint32x4 {
var x archsimd.Uint32x4
// amd64:`VPSRLD \$1, .*$`
return x.ShiftAllRight(1)
}
func aLtbLtc8_avx512(a, b, c archsimd.Int8x64) archsimd.Mask8x64 {
// the vector length implies AVX512 implies the mask operations.
// amd64:`KANDB`
return a.Less(b).And(b.Less(c))
}
func aLtbORbLtc8_avx512(a, b, c archsimd.Int8x64) archsimd.Mask8x64 {
// the vector length implies AVX512 implies the mask operations.
// amd64:`KORB`
return a.Less(b).Or(b.Less(c))
}
func aLtbLtc64_avx512(a, b, c archsimd.Int64x8) archsimd.Mask64x8 {
// the vector length implies AVX512 implies the mask operations.
// amd64:`KANDQ`
return a.Less(b).And(b.Less(c))
}
func aLtbORbLtc64_avx512(a, b, c archsimd.Int64x8) archsimd.Mask64x8 {
// the vector length implies AVX512 implies the mask operations.
// amd64:`KORQ`
return a.Less(b).Or(b.Less(c))
}
var globalSlice = []uint32{1, 2, 3, 4, 5, 6, 7, 8}
func simdMemoryOperandMerge() archsimd.Uint32x4 {
a := archsimd.BroadcastUint32x4(1)
// amd64:`VPADDD \([A-Z]+\), X\d, X\d`
a = a.Add(archsimd.LoadUint32x4(globalSlice[0:4]))
// amd64:`VPADDD 16\([A-Z]+\), X\d, X\d`
a = a.Add(archsimd.LoadUint32x4(globalSlice[4:8]))
return a
}