diff options
| author | Joel Sing <joel@sing.id.au> | 2022-09-05 03:03:35 +1000 |
|---|---|---|
| committer | Joel Sing <joel@sing.id.au> | 2022-10-11 04:03:17 +0000 |
| commit | ba8c94b5f255bf84d05cf90d3d66621ffd2e0fab (patch) | |
| tree | a9c8f53d50f377d425426e2b641a0b38a4f63130 /src/internal/coverage/stringtab/stringtab.go | |
| parent | 0ca355318f6c407edb4a82a0bb0c249ffd31840b (diff) | |
| download | go-ba8c94b5f255bf84d05cf90d3d66621ffd2e0fab.tar.xz | |
cmd/compile: convert SLT/SLTU with constant into immediate form on riscv64
Convert SLT/SLTU with a suitably valued constant into a SLTI/SLTIU instruction.
This can reduce instructions and avoid register loads. Now that we generate
more SLTI/SLTIU instructions, absorb these into branches when it makes sense
to do so.
Removes more than 800 instructions from the Go binary on linux/riscv64.
Change-Id: I42c4e00486697acd4da7669d441b5690795f18ae
Reviewed-on: https://go-review.googlesource.com/c/go/+/428499
Reviewed-by: Wayne Zuo <wdvxdr@golangcn.org>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
Diffstat (limited to 'src/internal/coverage/stringtab/stringtab.go')
0 files changed, 0 insertions, 0 deletions
