]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: store constant floats using integer constants
authorKeith Randall <khr@golang.org>
Thu, 13 Jun 2024 01:25:55 +0000 (18:25 -0700)
committerKeith Randall <khr@golang.org>
Tue, 23 Jul 2024 20:53:57 +0000 (20:53 +0000)
commitf66db499769002f1f804f52234b7c3e5917bbad6
treef4a51d385077e00ee64d98f1561e69ee7ee290d7
parentd15525d596eb49eba058178e3b633b5a2ebb4766
cmd/compile: store constant floats using integer constants

x86 is better at storing constant ints than constant floats.
(It uses a constant directly in the instruction stream, instead of
loading it from a constant global memory.)

Noticed as part of #67957

Change-Id: I9b7b586ad8e0fe9ce245324f020e9526f82b209d
Reviewed-on: https://go-review.googlesource.com/c/go/+/592596
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/compile/internal/ssa/_gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go
test/codegen/floats.go