Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: merging shifts into loads/stores isn't complete #36223
The compiler generates code like this:
We can use the
I think our rewrite engine now handles commutative ops more efficiently, so possibly not an issue anymore. Investigate, and do it.
I did some related work in https://go-review.googlesource.com/c/go/+/167089 and https://go-review.googlesource.com/c/go/+/167090. I have better tooling now, so I may try to improve these and try again for 1.15.
However, I don't think we handle commutative ops any more efficiently yet. Do you have plans to work on this? I've been contemplating different approaches.