]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: remove broken LEA "optimization"
authorDavid Chase <drchase@google.com>
Thu, 6 Apr 2023 18:42:53 +0000 (14:42 -0400)
committerDavid Chase <drchase@google.com>
Fri, 7 Apr 2023 19:42:10 +0000 (19:42 +0000)
commit6a97a60b4b80dfa9db91200c054d734e18dda115
treeb05b216372dc809a329adc9465e2acc8d1e21359
parent1444c0b01e4f83a90f0d97b3bf0b346290ec02e3
cmd/compile: remove broken LEA "optimization"

CL 440035 added rewrite rules to simplify "costly" LEA
instructions, but the types in the rewrites were wrong and
the code would go bad if the wrong-typed register was spilled.

CL 482536 attempted to fix this by correcting the type in the
rewrite, but that "fix" broke something on windows-amd64-race.

Instead / for-now, remove the offending rewrite rules.

Updates #21735.
Fixes #59432.

Change-Id: I0497c42db414f2055e1378e0a53e2bceee9cd5d9
Reviewed-on: https://go-review.googlesource.com/c/go/+/482820
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/ssa/_gen/AMD64latelower.rules
src/cmd/compile/internal/ssa/rewriteAMD64latelower.go