$ the-wire · showcase
Go compiler drops unnecessary riscv64 masking and hardens SIMD codegen
By RepoJournal · Filed · About Go
Go's compiler removes redundant shifts on riscv64 and stops SIMD zeros from implying AVX support, tightening codegen correctness on older CPUs.
A riscv64 compiler change eliminates unnecessary masking of shift operands [1] since shift instructions use only the lower six bits, or five for word operations. A separate fix prevents no-code SIMD values from implying CPU features [2]: a SIMD-typed zero, materialized as the all-zeros register X15, no longer forces AVX requirements in blocks that must run without AVX. The induction-variable min limit logic also now applies in dominated blocks [3], benefiting SIMD-unrolled loops with scalar tails. cmd/go's goauth_git test isolates itself from system Git credential helpers [4], fixing a 349-second timeout where inherited helpers blocked credential fills. The website documents GOAUTH for private module proxies [5], covering custom headers and HTTPS-only behavior, and screentest now rejects negative retrypixels values [6], which previously became math.MaxUint64. Go 1.26.8 and 1.27.1 are documented in history [7]. The known-bits pass also removes no-op ORs [8] where one argument is fully shadowed, catching cases prove misses.
Action items
- → Review which riscv64 builds your toolchain targets; masking removal improves code size and speed for that arch golang/go [plan]
- → Re-verify any SIMD-optimized code compiled for AVX-less machines after the no-code SIMD value commit golang/go [immediate]
- → Update internal docs referencing .netrc/GOPROXY auth to describe GOAUTH for private proxies golang/website [plan]
- → Test screentest runs ensure no retrypixels negative values are passed to avoid indefinite retries golang/website [monitor]
References
- [1] cmd/compile/internal/ssa: remove unnecessary masking with shifts on riscv64 ↗ golang/go
- [2] cmd/compile: don't let no-code SIMD values imply CPU features ↗ golang/go
- [3] cmd/compile: make indvar min limit visible in its block ↗ golang/go
- [4] cmd/go: isolate goauth_git from system credential helpers ↗ golang/go
- [5] _content/ref/mod: document GOAUTH for private module proxies ↗ golang/website
- [6] cmd/screentest: reject negative retrypixels values ↗ golang/website
- [7] internal/history: document Go 1.26.8 and 1.27.1 ↗ golang/website
- [8] cmd/compile: teach known bits to remove no-op or ↗ golang/go