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: use bounded shift information on non-amd64 architectures #25167

Open
josharian opened this Issue Apr 29, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@josharian
Contributor

josharian commented Apr 29, 2018

CL 109776 optimized some shifts on amd64. We should apply the same straightforward optimization rule changes to other architectures.

Might be a good starter SSA issue.

cc @mundaym @cherrymui

@mundaym

This comment has been minimized.

Member

mundaym commented Apr 30, 2018

cc @laboger and @ceseo for ppc64le.

@gopherbot

This comment has been minimized.

gopherbot commented Apr 30, 2018

Change https://golang.org/cl/110070 mentions this issue: cmd/compile: simplify shift lowering on s390x

@laboger

This comment has been minimized.

Contributor

laboger commented May 1, 2018

We can look at this for ppc64le in the next release.

gopherbot pushed a commit that referenced this issue May 8, 2018

cmd/compile: simplify shift lowering on s390x
Use conditional moves instead of subtractions with borrow to handle
saturation cases. This allows us to delete the SUBE/SUBEW ops and
associated rules from the SSA backend. Using conditional moves also
means we can detect when shift values are masked so I've added some
new rules to constant fold the relevant comparisons and masking ops.

Also use the new shiftIsBounded() function to avoid generating code
to handle saturation cases where possible.

Updates #25167 for s390x.

Change-Id: Ief9991c91267c9151ce4c5ec07642abb4dcc1c0d
Reviewed-on: https://go-review.googlesource.com/110070
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@gopherbot

This comment has been minimized.

gopherbot commented Sep 14, 2018

Change https://golang.org/cl/135380 mentions this issue: cmd/compile: use bounded shift information on ppc64x

gopherbot pushed a commit that referenced this issue Sep 18, 2018

cmd/compile: use bounded shift information on ppc64x
Makes use of bounded shift information to generate
more efficient shift instructions.

Updates #25167 for ppc64x

Change-Id: I7fc8d49a3fb3e0f273cc51bc767470b239cbdca7
Reviewed-on: https://go-review.googlesource.com/135380
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Munday <mike.munday@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment