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: implement register moves for int<->float conversions on ppc64le #18922
Labels
Comments
CL https://golang.org/cl/36725 mentions this issue. |
CL https://golang.org/cl/37651 mentions this issue. |
gopherbot
pushed a commit
that referenced
this issue
Mar 1, 2017
After https://go-review.googlesource.com/c/36725/, ppc64x no longer needs a temp stack location for int reg <-> fp reg moves. Update #18922 Change-Id: Ib4319784f7a855f593dfa5231604ca2c24e4c882 Reviewed-on: https://go-review.googlesource.com/37651 Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
ceseo
pushed a commit
to powertechpreview/go
that referenced
this issue
May 17, 2017
This makes a change in the SSA code generated for OpPPC64Xf2i64 and OpPPC64Xi2f64 to use register based instructions to convert between float and integer. This will require at least power8. Currently the conversion is done by storing to and loading from memory, which is more expensive. This improves some of the math functions: BenchmarkExp-128 74.1 66.8 -9.85% BenchmarkExpGo-128 87.4 66.3 -24.14% BenchmarkExp2-128 72.2 64.3 -10.94% BenchmarkExp2Go-128 74.3 65.9 -11.31% BenchmarkLgamma-128 51.0 39.7 -22.16% BenchmarkLog-128 42.9 40.6 -5.36% BenchmarkLogb-128 11.5 9.16 -20.35% BenchmarkLog1p-128 38.9 36.2 -6.94% BenchmarkSin-128 29.5 23.7 -19.66% BenchmarkTan-128 32.8 27.4 -16.46% Fixes golang#18922 Change-Id: I8e1cf14d3880d7cd720dc5188dd174cba1f7fef7 Reviewed-on: https://go-review.googlesource.com/36725 Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> Reviewed-by: Keith Randall <khr@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go tip
What operating system and processor architecture are you using (
go env
)?Ubuntu 16.04
What did you do?
Code inspection and profiles on many math functions show that conversion between integer and float are done with a store to and load from memory which is not as efficient if done in registers. In power8 there are instructions to allow this conversion in registers.
This change will generate register moves for integer <-> float conversions (both to and from) on ppc64le. It won't be done on ppc64 (BE) since that currently must be compatible with power5 and the instruction to do the move is not available there.
The text was updated successfully, but these errors were encountered: