• Lynn Boger's avatar
    cmd/compile, math/bits: add rotate rules to PPC64.rules · fa3fe2e3
    Lynn Boger authored
    This adds rules to match the code in math/bits RotateLeft,
    RotateLeft32, and RotateLef64 to allow them to be inlined.
    
    The rules are complicated because the code in these function
    use different types, and the non-const version of these
    shifts generate Mask and Carry instructions that become
    subexpressions during the match process.
    
    Also adds a testcase to asm_test.go.
    
    Improvement in math/bits:
    
    BenchmarkRotateLeft-16       1.57     1.32      -15.92%
    BenchmarkRotateLeft32-16     1.60     1.37      -14.37%
    BenchmarkRotateLeft64-16     1.57     1.32      -15.92%
    
    Updates #21390
    
    Change-Id: Ib6f17669ecc9cab54f18d690be27e2225ca654a4
    Reviewed-on: https://go-review.googlesource.com/59932
    Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    fa3fe2e3
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...