]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: improve subtraction of constants on riscv64
authorJoel Sing <joel@sing.id.au>
Sun, 1 Mar 2020 17:23:12 +0000 (04:23 +1100)
committerJoel Sing <joel@sing.id.au>
Tue, 3 Mar 2020 11:36:47 +0000 (11:36 +0000)
commitbd6f4cd886458bb4ab1f492202fa2b499dcfc6f7
tree61f53f045d065a1f4be1779ea34f6806830d80a3
parent52b457d6f320c3491ab14a71afc3c7416b36430c
cmd/compile: improve subtraction of constants on riscv64

Convert subtraction of a constant into an ADDI with a negative immediate,
where possible.

Change-Id: Ie8d54b7538f0012e5f898abea233b2957fe31899
Reviewed-on: https://go-review.googlesource.com/c/go/+/221679
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/compile/internal/ssa/gen/RISCV64.rules
src/cmd/compile/internal/ssa/rewriteRISCV64.go