-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: Flag* ops should never make it to codegen #39505
Comments
This error seems to have been caused by e031318 |
Thanks @marigonzes for bisecting. cc @shawn-xdji and @zhangfannie too, then. |
Thanks. It seems the new noov ops also need to handle constant flags. (I also leave a comment on the CL.) |
@marigonzes Thanks for locating the culprit commit, I'm working on a fix. |
Hi @ALTree I'm trying to figure out more testing scenarios, could you please shed a light what kind of code snippet would trigger the rewriting? I tried some expressions like "if const_function1() <OP> const_function2()" but no lucky. Thanks. |
@shawn-xdji Sorry, I'm afraid I can't help. In general it can be quite hard to come up with a Go program that will trigger a specific SSA rule (unless the rule is a very peculiar one). Maybe Cherry or Keith have a better insight. |
The simplest one I could figure out is
By adjusting 'c', '*v' and the operator I think all concerned rules could be tested, not sure if it could be simplified further. I will install them to test/fixedbugs along with the fix. |
Change https://golang.org/cl/237860 mentions this issue: |
Change https://golang.org/cl/238077 mentions this issue: |
Change https://golang.org/cl/237999 mentions this issue: |
Change https://golang.org/cl/238677 mentions this issue: |
Encode the flag results in an auxint field instead of having one opcode per flag state. This helps us handle the new *noov branches in a unified manner. This is only for arm, arm64 is in a subsequent CL. We could extend to other architectures as well, athough it would only be cleanup, no behavioral change. Update #39505 Change-Id: Ia46cea596faad540d1496c5915ab1274571543f0 Reviewed-on: https://go-review.googlesource.com/c/go/+/238077 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Flag constant Ops on arm and arm64 are under refactoring, this change adds a couple of testcases that verify the behavior of 'noov' branches. Updates #39505 Updates #38740 Updates #39303 Change-Id: I493344b52276900cd296c32da494d72932dfc9be Reviewed-on: https://go-review.googlesource.com/c/go/+/238677 Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
The following program:
Crashes the tip compiler when built for
arm
orarm64
:It compiles fine on go1.14.4, so this is a tip regression in two First Class Ports. I'm tentatively labelling this as a release-blocker, but leaving to you to decide if this is fine.
cc @randall77 @cherrymui
The text was updated successfully, but these errors were encountered: