diff options
| author | Keith Randall <khr@golang.org> | 2025-11-17 15:33:01 -0800 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2025-11-18 09:37:02 -0800 |
| commit | 4d0658bb0871806a8c5551063d1ef1d205916ceb (patch) | |
| tree | 2d6864f113f84085e43c5a74cd510632a97eeccb /src/runtime/debuglog.go | |
| parent | ba634ca5c7f19105c853db5752cc0f6d3ca76e45 (diff) | |
| download | go-4d0658bb0871806a8c5551063d1ef1d205916ceb.tar.xz | |
cmd/compile: prefer fixed registers for values
For this code:
func f() (int, int) {
return 0, 0
}
We currently generate on arm64:
MOVD ZR, R0
MOVD R0, R1
This CL changes that to
MOVD ZR, R0
MOVD ZR, R1
Probably not a big performance difference, but it makes the generated
code clearer.
A followup-ish CL from 633075 when the zero fixed register was exposed
to the register allocator.
Change-Id: I869a92817dcbbca46c900999fab538e76e10ed05
Reviewed-on: https://go-review.googlesource.com/c/go/+/721440
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/debuglog.go')
0 files changed, 0 insertions, 0 deletions
