-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: "internal compiler error: schedule does not include all values" on s390x #38916
Comments
Thanks, I'll take a look. |
Took a chance at bisecting this and commit b2790a2 showed up |
This is a bug in the CSE pass. There is a subtle bug in the way tuple selection ops are fixed up so that they are in the correct block. The failure can be exposed using this patch: diff --cc src/cmd/compile/internal/ssa/cse.go
index 15dfe6d795,15dfe6d795..b61c36b128
--- a/src/cmd/compile/internal/ssa/cse.go
+++ b/src/cmd/compile/internal/ssa/cse.go
@@@ -201,10 -201,10 +201,16 @@@ func cse(f *Func)
// New values are created when selectors are copied to
// a new block. We can safely ignore those new values,
// since they have already been copied (issue 17918).
-- if int(v.ID) >= len(rewrite) || rewrite[v.ID] != nil {
++ if v.Op != OpSelect0 && v.Op != OpSelect1 {
continue
}
-- if v.Op != OpSelect0 && v.Op != OpSelect1 {
++ if int(v.ID) >= len(rewrite) {
++ continue
++ }
++ if x := rewrite[v.ID]; x != nil {
++ if y := rewrite[x.Args[0].ID]; y != nil && x.Block != y.Block {
++ f.Fatalf("rewrite to dead tuple selector: %v -> %v", v, x)
++ }
continue
}
if !v.Args[0].Type.IsTuple() { |
Change https://golang.org/cl/233857 mentions this issue: |
Change https://golang.org/cl/233941 mentions this issue: |
CL 233857 fixed the underlying issue for #37246, which had arisen again as #38916. Add the test case from #37246 to ensure it stays fixed. Fixes #37246 Change-Id: If7fd75a096d2ce4364dc15509253c3882838161d Reviewed-on: https://go-review.googlesource.com/c/go/+/233941 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Munday <mike.munday@ibm.com>
This program:
Crashes the tip compiler, when built for s390x, with the following error:
It compiles fine on Go1.14.2.
The root cause may be similar to the one for #37246, but the reproducers in #37246 do not crash the 1.14.2 nor the tip compilers, while the program above does crash current tip.
cc @randall77 @mundaym @ruixin-bao
The text was updated successfully, but these errors were encountered: