diff options
| author | David Chase <drchase@google.com> | 2025-12-11 14:27:10 -0500 |
|---|---|---|
| committer | David Chase <drchase@google.com> | 2026-03-01 11:58:20 -0800 |
| commit | d51d4d75a67a5c0228ed55107a809f8f377c5949 (patch) | |
| tree | b564633786fcb29aa6ff35ab3b606bfa25cc52d8 /test/codegen | |
| parent | 425a88193ca39e82dc3dbcae22b98dbdfd98a04c (diff) | |
| download | go-d51d4d75a67a5c0228ed55107a809f8f377c5949.tar.xz | |
cmd/compile: (wasm) optimize float32(round64(float64(x)))
Not a fix because there are other architectures
still to be done.
Updates #75463.
Change-Id: Ia5233c2b6c5f4439e269950efdd851e72e8e7ff6
Reviewed-on: https://go-review.googlesource.com/c/go/+/730160
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'test/codegen')
| -rw-r--r-- | test/codegen/floats.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/codegen/floats.go b/test/codegen/floats.go index bf9e70d43e..3f27e54751 100644 --- a/test/codegen/floats.go +++ b/test/codegen/floats.go @@ -283,15 +283,22 @@ func Float64ConstantStore(p *float64) { func WideCeilNarrow(x float32) float32 { // amd64/v3:"ROUNDSS" // arm64:"FRINTPS" + // wasm:"F32Ceil" return float32(math.Ceil(float64(x))) } func WideTruncNarrow(x float32) float32 { // amd64/v3:"ROUNDSS" // arm64:"FRINTZS" + // wasm:"F32Trunc" return float32(math.Trunc(float64(x))) } +func WideCopysignNarrow(x, y float32) float32 { + // wasm:"F32Copysign" + return float32(math.Copysign(float64(x), float64(y))) +} + // ------------------------ // // Subnormal tests // // ------------------------ // |
