]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't depend on arch-dependent conversions in the compiler
authorKeith Randall <khr@golang.org>
Mon, 13 Oct 2025 16:39:06 +0000 (09:39 -0700)
committerKeith Randall <khr@golang.org>
Mon, 13 Oct 2025 19:19:32 +0000 (12:19 -0700)
commit9b8742f2e79438b9442afa4c0a0139d3937ea33f
treebe146fe856cf0e978d90bfbcb4e62fa8f489f2d9
parent0e64ee1286c092eca95b3ffcc5917d34f43d4c0f
cmd/compile: don't depend on arch-dependent conversions in the compiler

Leave those constant foldings for runtime, similar to how we do it
for NaN generation.

These are the only instances I could find in cmd/compile/..., using

objdump -d ../pkg/tool/darwin_arm64/compile| egrep "(fcvtz|>:)" | grep -B1 fcvt

(There are instances in other places, like runtime and reflect, but I don't
think those places would affect compiler output.)

Change-Id: I4113fe4570115e4765825cf442cb1fde97cf2f27
Reviewed-on: https://go-review.googlesource.com/c/go/+/711281
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/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go
test/codegen/math.go