]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: improve SignExt32to64 on riscv64
authorJoel Sing <joel@sing.id.au>
Tue, 25 Feb 2020 17:00:10 +0000 (04:00 +1100)
committerJoel Sing <joel@sing.id.au>
Fri, 28 Feb 2020 14:33:28 +0000 (14:33 +0000)
commit8955a56da015890f317d5f6919391503b854d93a
tree59483143777c46d5d25fe01103dd9f3c1b1ffd0f
parent44286d09c5fcdb703624fad6ce24306294cab1fe
cmd/compile: improve SignExt32to64 on riscv64

SignExt32to64 can be implemented with a single ADDIW instruction, rather than
the two shifts that are in use currently.

Change-Id: Ie1bbaef4018f1ba5162773fc64fa5a887457cfc9
Reviewed-on: https://go-review.googlesource.com/c/go/+/220922
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/riscv64/ssa.go
src/cmd/compile/internal/ssa/gen/RISCV64.rules
src/cmd/compile/internal/ssa/gen/RISCV64Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteRISCV64.go