-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: optimize away useless ANDs and ORs #14367
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
Comments
Have you tried the ssa branch? |
Just tried it on dev.ssa It elides instructions for OR zero, but strangely does a triple shift in some places:
|
I'll look at this one, I introduced the AND to double shift :-) |
CL https://golang.org/cl/19690 mentions this issue. |
The final AND 0xff00000000000000 is gone. |
Using
go1.5.3
The following code has a few useless expressions:
The instructions with
#
marks are unnecessary. It would be nice if the compiler did not generate them.The text was updated successfully, but these errors were encountered: