Skip to content

cmd/compile: internal compiler error: Invalid PPC64 rotate mask #62698

Closed
@ALTree

Description

@ALTree
$ gotip version
go version devel go1.22-38b2c06 Sun Sep 17 09:04:09 2023 +0000 windows/amd64
package p

func F(a []int, s string, x int) int {
        return a[x&^copy([]byte{}, s)]
}
$ GOARCH=ppc64 gotip build crash.go

./crash.go:4:18: internal compiler error: 'F': panic during late lower while compiling F:

Invalid PPC64 rotate mask

goroutine 22 [running]:
cmd/compile/internal/ssa.Compile.func1()
        ./gotip/src/cmd/compile/internal/ssa/compile.go:49 +0x6c
panic({0x1061720?, 0x1261ea0?})
        ./gotip/src/runtime/panic.go:765 +0x132
cmd/compile/internal/ssa.encodePPC64RotateMask(0xcc5e85?, 0xc0001701e0?, 0xc0003d9890?)
        ./gotip/src/cmd/compile/internal/ssa/rewrite.go:1481 +0x126
cmd/compile/internal/ssa.rewriteValuePPC64latelower_OpPPC64AND(0xc0004e9bf0)
        ./gotip/src/cmd/compile/internal/ssa/rewritePPC64latelower.go:67 +0x1ea
cmd/compile/internal/ssa.rewriteValuePPC64latelower(0xc0003d9ca8?)
        ./gotip/src/cmd/compile/internal/ssa/rewritePPC64latelower.go:11 +0x35
...

cc @golang/compiler

Metadata

Metadata

Assignees

Labels

FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.arch-ppc64xcompiler/runtimeIssues related to the Go compiler and/or runtime.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions