-
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: ICE due to "Flag* ops should never make it to codegen" #22198
Comments
Not surprising, but it also repros with the original |
The seemingly relevant SSA ops are:
These are generated by lower from:
I'm guessing the rewrite rules just need reordering so that we instead lower into moving constant 1 to memory. |
Adding a rule for
seems to fix the ICE. Not sure if that's the best solution. (A complete fix would at least handle all the other SETCC/FlagCC combinations.) /cc @cherrymui |
Seems a regression from CL https://go-review.googlesource.com/c/go/+/67950. Indeed the handling of constant flags is missing. Adding @mdempsky's rule looks right to me. cc @TocarIP |
There are already rules (around line 1487 of AMD64.rules) that handles non-mem version of SETCC and constant flags. Seems we should add the similar ones for SETCCmem. |
Here's the best I've been able to minimize the test case so far:
|
Also, the repro happens even without -l=4. It just happens to have been discovered in the protobuf code using -l=4. |
Change https://golang.org/cl/69990 mentions this issue: |
/cc @randall77
The text was updated successfully, but these errors were encountered: