-
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 in block on s390x #39472
Comments
Bisection points to b2790a2 |
Slightly more minimal reproducer: package p
func f(x float64) bool {
x += 1
return (x != 0) == (x != 0)
} The problem is that the s390x rules can insert duplicate
That isn't a problem with CSE enabled because it will de-duplicate them. One possibility is that we pull the |
Change https://golang.org/cl/237118 mentions this issue: |
@mundaym As you stated "The problem is that the s390x rules can insert duplicate Select0 and Select1 ops.". I may be out of line here, but I'd say the right fix is to avoid doing that in the first place, not add another pass that cleans up the mistake from the previous pass. |
@beoran Yeah, that is one possibility. Though I would point out that there is no good way to have tuple optimization rules without encountering the duplication issue and it may well be hit again in the future. The main advantage of doing the cleanup as a separate pass is however that it means that none of the passes up until that point have to worry about maintaining this invariant, whether it be CSE, optimization rules or some other future optimization pass that has yet to be added. That's quite nice since every invariant like this that we have to maintain is yet more complexity in individual passes. There is no real reason to treat selectors differently from other ops in most passes, only the scheduler & register allocator actually care. |
Seeing the PR and the relative simplicity of this pass, I must admit this
is probably an ok solution. I didn't know the GC go compiler had that many
mandatory passes, so one more might be ok, if it simplifies other passes.
Op wo 10 jun. 2020 16:56 schreef GopherBot <notifications@github.com>:
… Closed #39472 <#39472> via ac743de
<ac743de>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39472 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAARM6JQPCXAWBKM3LKBYK3RV6NJNANCNFSM4NZFXYDA>
.
|
The following program:
Crashes the tip compiler when built for s390x with optimizations disabled:
It compiles fine on go1.14.4, so this is a tip regression. I'm tentatively labelling this as a release-blocker, but leaving to you to decide if this is fine.
cc @mundaym @randall77 @cherrymui
The text was updated successfully, but these errors were encountered: