• erifan01's avatar
    cmd/compile: intrinsify math/bits.Sub64 for arm64 · f8f265b9
    erifan01 authored
    This CL instrinsifies Sub64 with arm64 instruction sequence NEGS, SBCS,
    NGC and NEG, and optimzes the case of borrowing chains.
    
    Benchmarks:
    name              old time/op       new time/op       delta
    Sub-64            2.500000ns +- 0%  2.048000ns +- 1%  -18.08%  (p=0.000 n=10+10)
    Sub32-64          2.500000ns +- 0%  2.500000ns +- 0%     ~     (all equal)
    Sub64-64          2.500000ns +- 0%  2.080000ns +- 0%  -16.80%  (p=0.000 n=10+7)
    Sub64multiple-64  7.090000ns +- 0%  2.090000ns +- 0%  -70.52%  (p=0.000 n=10+10)
    
    Change-Id: I3d2664e009a9635e13b55d2c4567c7b34c2c0655
    Reviewed-on: https://go-review.googlesource.com/c/go/+/159018Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    f8f265b9
ARM64Ops.go 47.7 KB