Repository navigation
cmd/compile: fix broken regalloc eviction of AVX-512 K mask values on amd64 #81767
Copy link
Copy link
Closed as duplicate
Closed as duplicate
Copy link
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Description
Go version
go version go1.28-devel_8190b02cec linux/amd64
Output of go env in your module/workspace:
AR='ar'
CC='gcc'
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_ENABLED='1'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
CXX='g++'
GCCGO='gccgo'
GO111MODULE=''
GOAMD64='v1'
GOARCH='amd64'
GOAUTH='netrc'
GOBIN='/usr/local/google/home/sjmuir/go/bin'
GOCACHE='/usr/local/google/home/sjmuir/.cache/go-build'
GOCACHEPROG=''
GODEBUG=''
GOENV='/usr/local/google/home/sjmuir/.config/go/env'
GOEXE=''
GOEXPERIMENT='simd'
GOFIPS140='off'
GOFLAGS=''
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2210645409=/tmp/go-build -gno-record-gcc-switches'
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMOD='/dev/null'
GOMODCACHE='/usr/local/google/home/sjmuir/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPACKAGESDRIVER=''
GOPATH='/usr/local/google/home/sjmuir/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/google/home/sjmuir/go/git/go-tip'
GOSUMDB='sum.golang.org'
GOTELEMETRY='local'
GOTELEMETRYDIR='/usr/local/google/home/sjmuir/.config/go/telemetry'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/google/home/sjmuir/go/git/go-tip/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.28-devel_8190b02cec Thu Sep 24 15:49:11 2026 -0700'
GOWORK=''
PKG_CONFIG='pkg-config'What did you do?
Attempting to generate a version of bytes.IndexByte by using the SIMD API, got very ambitious with loop unrolling and decided that 8-way unrolling would be desirable. This worked great in earlier versions of Go, but when rebasing the change onto tip we found out that 8-way unrolling causes a compiler panic.
What did you see happen?
Compiler panic due to spilling >7 K mask registers on AMD64.
Program that reproduces the bug: https://go.dev/play/p/kLfBd5L1DAS
What did you expect to see?
Compiler not panicking.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FixPendingIssues that have a fix which has not yet been reviewed or submitted.Issues that have a fix which has not yet been reviewed or submitted.NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Type
Projects
- StatusShow more project fieldsDone
Activity
gopherbot commentedon Sep 26, 2026
Change https://go.dev/cl/838845 mentions this issue:
cmd/compile: fix regalloc eviction of AVX-512 K mask values on amd64gabyhelp commentedon Sep 26, 2026
Related Issues
Related Code Changes
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
prattmic commentedon Sep 29, 2026
cc @golang/compiler
9muir commentedon Oct 7, 2026
This is duplicated by #81976, and the fix there is sufficient