From 80a2aae922fa64f0d37b1fc81812d2ef95c0b4e6 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Wed, 10 Sep 2025 10:39:17 -0700 Subject: Revert "cmd/compile: improve stp merging for non-sequent cases" This reverts commit 4c63d798cb947a3cdd5a5b68f254a73d83eb288f. Reason for revert: Causes miscompilations. See issue 75365. Change-Id: Icd1fcfeb23d2ec524b16eb556030f43875e1c90d Reviewed-on: https://go-review.googlesource.com/c/go/+/702455 Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI Reviewed-by: Cherry Mui Auto-Submit: Keith Randall Reviewed-by: Mark Freeman --- test/codegen/memcombine.go | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'test/codegen') diff --git a/test/codegen/memcombine.go b/test/codegen/memcombine.go index 9457d15f6a..fa0e902ac2 100644 --- a/test/codegen/memcombine.go +++ b/test/codegen/memcombine.go @@ -1053,34 +1053,17 @@ func dwstoreF32(p *struct{ a, b float32 }, x, y float32) { } func dwstoreBig(p *struct{ a, b, c, d, e, f int64 }, a, b, c, d, e, f int64) { - // arm64:`STP\s\(R[0-9]+, R[0-9]+\), 16\(R[0-9]+\)` + // This is not perfect. We merge b+a, then d+e, then c and f have no pair. p.c = c - // arm64:`STP\s\(R[0-9]+, R[0-9]+\), 32\(R[0-9]+\)` p.f = f // arm64:`STP\s\(R[0-9]+, R[0-9]+\), \(R[0-9]+\)` p.a = a + // arm64:`STP\s\(R[0-9]+, R[0-9]+\), 24\(R[0-9]+\)` p.e = e p.d = d p.b = b } -func dwstoreUnorderedArray(p *struct{ a, b, c, d int }, a, b, c, d int) { - // arm64:`STP\s\(R[0-9]+, R[0-9]+\), 16\(R[0-9]+\)` - p.c = c - p.d = d - // arm64:`STP\s\(R[0-9]+, R[0-9]+\), \(R[0-9]+\)` - p.a = a - p.b = b -} - -func dwstoreBigNil(p *struct{ i, j struct{ a, b, c int } }) { - // arm64:`STP\s\(ZR, ZR\), 32\(R[0-9]+\)` - // arm64:`STP\s\(ZR, ZR\), 16\(R[0-9]+\)` - p.j = struct{ a, b, c int }{} - // arm64:`STP\s\(ZR, ZR\), \(R[0-9]+\)` - p.i = struct{ a, b, c int }{} -} - func dwstoreRet() [2]int { // arm64:"STP\t" return [2]int{5, 6} -- cgit v1.3