Skip to content
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: better generated code for a&^b on ppc64x #17567

Closed
laboger opened this issue Oct 24, 2016 · 1 comment
Closed

cmd/compile: better generated code for a&^b on ppc64x #17567

laboger opened this issue Oct 24, 2016 · 1 comment

Comments

@laboger
Copy link
Contributor

laboger commented Oct 24, 2016

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

tip

What operating system and processor architecture are you using (go env)?

Ubuntu 16.04 ppc64le

What did you do?

Looking at generated code for sha3, found some unnecessary code for a statement like a & ^b

  f046c:       ff ff e0 3f     lis     r31,-1
  f0470:       ff ff ff 63     ori     r31,r31,65535
  f0474:       78 62 ee 7f     xor     r14,r31,r12
  f0478:       38 70 6e 7d     and     r14,r11,r14

Better code would be:

   ef794:       78 30 06 7d     andc    r6,r8,r6
@gopherbot
Copy link

CL https://golang.org/cl/31769 mentions this issue.

@golang golang locked and limited conversation to collaborators Oct 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants