aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorJorropo <jorropo.pgm@gmail.com>2025-12-20 14:11:35 +0100
committerGopher Robot <gobot@golang.org>2026-01-23 12:24:56 -0800
commit478d86446e88dc9e0b46e08914cb564d7c705d1e (patch)
tree886b922658ff0511cce29dd9b3acaebab1aae534 /test/codegen
parent8f739162e6479e98b0950ac9dc2f69cd79031be2 (diff)
downloadgo-478d86446e88dc9e0b46e08914cb564d7c705d1e.tar.xz
cmd/compile: on amd64 use 32bits copies for 64bits copies of 32bits values
Fixes #76449 This saves a single byte for the REX prefix per OpCopy it triggers on. Change-Id: I1eab364d07354555ba2f23ffd2f9c522d4a04bd0 Reviewed-on: https://go-review.googlesource.com/c/go/+/731640 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Jorropo <jorropo.pgm@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/constants.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/codegen/constants.go b/test/codegen/constants.go
index 178a106552..9b014b54b1 100644
--- a/test/codegen/constants.go
+++ b/test/codegen/constants.go
@@ -33,3 +33,12 @@ func contiguousMaskConstants() (out [64]uint64) {
out[3] = 0xFFFFFFFE00000001
return
}
+
+func issue76449_1() (_, _, _ uint64) {
+ // amd64:-"MOVQ"
+ return 0, 0, 0
+}
+func issue76449_2() (_, _, _ uint64) {
+ // amd64:-"MOVQ"
+ return 1, 2, 1
+}