]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use reg moves for int <-> float conversions on ppc64x
authorLynn Boger <laboger@linux.vnet.ibm.com>
Fri, 10 Feb 2017 20:40:44 +0000 (15:40 -0500)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 1 Mar 2017 16:02:24 +0000 (16:02 +0000)
commit44053de36509f4634befbf7ad442b5debd0f0cdf
treead4f82f23b3fbefc3fac393a8038586197d6bb76
parent3123df3464ff8df1d15452b51360e1b7f05dbcd3
cmd/compile: use reg moves for int <-> float conversions on ppc64x

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 #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>
src/cmd/compile/internal/ppc64/prog.go
src/cmd/compile/internal/ppc64/ssa.go