Skip to content

cmd/compile: panic: bad move #81976

Closed
Closed

Description

@ALTree
$ gotip version
go version go1.28-devel_6f5c275ebdc Fri Oct 2 14:55:20 2026 -0700 linux/amd64
package p

import "simd/archsimd"

func F(z archsimd.Float32x8) archsimd.Float32x8 {
	_ = func() {
		fu := func(p1 int, p2 map[int]int) {}
		fu(func() int {
			z = z.Compress(archsimd.Mask32x8{})
			return z.Len()
		}(), map[int]int{})
		for range 2 {
			z = z.Expand(archsimd.Mask32x8{})
		}
	}
	return z
}
$ GOEXPERIMENT=simd gotip build crash.go 
# command-line-arguments
panic: bad move, src=2124, dest=2101, width=8 [recovered, repanicked]

goroutine 22 [running]:
sync.(*WaitGroup).Go.func1.1()
	../desktop/gotip/src/sync/waitgroup.go:251 +0x3e
panic({0x19b2fd0?, 0x312fc3dce600?})
	../desktop/gotip/src/runtime/panic.go:859 +0x11f
cmd/compile/internal/amd64.moveByRegsWidth(0x835, 0xc34e?, 0x8, 0xbe?)
	../desktop/gotip/src/cmd/compile/internal/amd64/ssa.go:164 +0x2e7
cmd/compile/internal/amd64.ssaGenValue(0x312fc3c77a40, 0x312fc3d69b40)
	../desktop/gotip/src/cmd/compile/internal/amd64/ssa.go:1372 +0x249c
cmd/compile/internal/ssagen.genssa({0x1a20078, 0x0}, 0x312fc3dd01c0, 0x312fc3de6900)
	../desktop/gotip/src/cmd/compile/internal/ssagen/ssa.go:7212 +0x18bf
cmd/compile/internal/ssagen.Compile({0x1a1d808, 0x1ccda20}, 0x312fc3c4a500, 0x3, 0x0?)
	../desktop/gotip/src/cmd/compile/internal/ssagen/pgen.go:316 +0x513
cmd/compile/internal/gc.compileFunctions.func2()
	../desktop/gotip/src/cmd/compile/internal/gc/compile.go:174 +0x1ab
sync.(*WaitGroup).Go.func1()
	../desktop/gotip/src/sync/waitgroup.go:258 +0x4a
created by sync.(*WaitGroup).Go in goroutine 1
	../desktop/gotip/src/sync/waitgroup.go:238 +0x7d

Activity

  1. added
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Oct 3, 2026
  2. added
    invalidThis issue is empty, incomplete (e.g. unanswered template questions), or spam.
    on Oct 3, 2026
  3. removed
    invalidThis issue is empty, incomplete (e.g. unanswered template questions), or spam.
    on Oct 3, 2026
  4. thepudds commented on Oct 3, 2026

    @thepudds
    Member

    FWIW, this seemed to bisect to 68f391a (which was for arm64, but might have affected amd64):

      first BAD:   68f391a3c2 | 2026-08-13 17:11 | simd, cmd/compile: support ARM64 SVE archsimd APIs.
      GOOD parent: 5e6be730dc | 2026-08-13 17:09 | runtime, internal/cpu: support ARM64 SVE register preemption
    

    @JunyangShao @dr2chase

  5. gopherbot commented on Oct 6, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/845805 mentions this issue: cmd/compile: use a separate RegMask for predicate registers

  6. added
    FixPendingIssues that have a fix which has not yet been reviewed or submitted.
    and removed
    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.
    on Oct 6, 2026
  7. added this to the Go1.28 milestone on Oct 6, 2026
  8. added a commit that references this issue on Oct 6, 2026
    7f51efb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixPendingIssues that have a fix which has not yet been reviewed or submitted.compiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions