diff options
| author | Wayne Zuo <wdvxdr@golangcn.org> | 2022-09-06 11:43:28 +0800 |
|---|---|---|
| committer | Joel Sing <joel@sing.id.au> | 2022-10-06 05:21:04 +0000 |
| commit | af668c689c66588f8adb9f5cd6db812706536338 (patch) | |
| tree | 1537804de703171a60a5996aac6228e84d9aab28 /src/os/exec/exec_test.go | |
| parent | b314eea4cdba0755caedc9a3e683d3f7e1e2be6f (diff) | |
| download | go-af668c689c66588f8adb9f5cd6db812706536338.tar.xz | |
cmd/compile: fold constant shift with extension on riscv64
For example:
movb a0, a0
srai $1, a0, a0
the assembler will expand to:
slli $56, a0, a0
srai $56, a0, a0
srai $1, a0, a0
this CL optimize to:
slli $56, a0, a0
srai $57, a0, a0
Remove 270+ instructions from Go binary on linux/riscv64.
Change-Id: I375e19f9d3bd54f2781791d8cbe5970191297dc8
Reviewed-on: https://go-review.googlesource.com/c/go/+/428496
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/os/exec/exec_test.go')
0 files changed, 0 insertions, 0 deletions
