]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: let MADD/MSUB combination happen more often on arm64
authorKeith Randall <khr@golang.org>
Tue, 19 Nov 2024 17:15:19 +0000 (09:15 -0800)
committerKeith Randall <khr@golang.org>
Wed, 20 Nov 2024 16:30:01 +0000 (16:30 +0000)
commit98e719f677e401e65e0cf41a630fc859ae0b28b8
tree78c715291f7fbba89a7674c1e24fe02198bdd012
parent7d2e3da2432f3030e282ef88793d03c86d3b8d17
cmd/compile: let MADD/MSUB combination happen more often on arm64

We have a single-instruction x+y*z op. Unfortunately x can't be
a constant, so the rule that builds them doesn't apply in that case.

This CL handles x+(c+y*z) by reordering to c+(x+y*z) so x is
in the right place.

Change-Id: Ibed621607d49da70474128e20991e0c4630ebfad
Reviewed-on: https://go-review.googlesource.com/c/go/+/629858
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>
src/cmd/compile/internal/ssa/_gen/ARM64.rules
src/cmd/compile/internal/ssa/rewriteARM64.go