• Lynn Boger's avatar
    cmd/compile: use reg moves for int <-> float conversions on ppc64x · 44053de3
    Lynn Boger authored
    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/36725Reviewed-by: default avatarCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>
    Reviewed-by: default avatarKeith Randall <khr@golang.org>
    44053de3
prog.go 14.1 KB