From d6c29c71562df407cc18846efd2e9d8fe0b28960 Mon Sep 17 00:00:00 2001 From: Junyang Shao Date: Wed, 21 May 2025 18:50:39 +0000 Subject: cmd/compile: fix offset calculation error in memcombine Fixes #73812 Change-Id: If7a6e103ae9e1442a2cf4a3c6b1270b6a1887196 Reviewed-on: https://go-review.googlesource.com/c/go/+/675175 Reviewed-by: Keith Randall Auto-Submit: Junyang Shao Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI --- test/codegen/issue72832.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/codegen') diff --git a/test/codegen/issue72832.go b/test/codegen/issue72832.go index a7f6ca8c5c..392b41b173 100644 --- a/test/codegen/issue72832.go +++ b/test/codegen/issue72832.go @@ -35,7 +35,16 @@ type tile3 struct { func store_shifted(t *tile3, x uint32) { // amd64:`MOVL` + // ppc64:`MOVHBR` t.a = uint8(x) t.b = uint8(x >> 8) t.c = uint16(x >> 16) } + +func store_const(t *tile3) { + // 0x00030201 + // amd64:`MOVL\s\$197121` + // 0x01020003 + // ppc64:`MOVD\s\$16908291` + t.a, t.b, t.c = 1, 2, 3 +} -- cgit v1.3-5-g9baa