]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix rewrite rules for multiply/add
authorKeith Randall <khr@golang.org>
Thu, 21 Nov 2024 01:48:30 +0000 (17:48 -0800)
committerDavid Chase <drchase@google.com>
Thu, 21 Nov 2024 15:06:30 +0000 (15:06 +0000)
commit0a0a7a564271ab8acfe6210a6e1ca19e712e0d1f
tree9a08c4f9794c1592dcc76545cff3fcde4753f546
parent3ff868f2f50ed5ec44f77bf9f27e42e51e2aae4a
cmd/compile: fix rewrite rules for multiply/add

x - (y - c) == (x - y) + c, not (x - y) - c. Oops.

Fixes #70481

Change-Id: I0e54d8e65dd9843c6b92c543ac69d69ee21f617c
Reviewed-on: https://go-review.googlesource.com/c/go/+/630397
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Jakub Ciolek <jakub@ciolek.dev>
Auto-Submit: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/_gen/ARM64.rules
src/cmd/compile/internal/ssa/rewriteARM64.go
test/fixedbugs/issue70481.go [new file with mode: 0644]
test/fixedbugs/issue70481.out [new file with mode: 0644]