aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2025-12-31 02:42:30 -0500
committerCherry Mui <cherryyz@google.com>2026-01-02 12:13:40 -0800
commit13440fb51831bfde5804430596d2045a64fd2209 (patch)
tree84196ec227a3ed45eee119c10a434169216e9516 /test/codegen
parentc3550b3352ae283110c443576e1e62cdf8efaa72 (diff)
downloadgo-13440fb51831bfde5804430596d2045a64fd2209.tar.xz
simd/archsimd: make IsNaN unary
Currently, the IsNan API is defined as x.IsNan(y), which returns a mask to represent, for each element, either x or y is NaN. Albeit closer to the machine instruction, this is weird API, as IsNaN is a unary operation. This CL changes it to unary, x.IsNaN(). It compiles to VCMPPS $3, x, x (or VCMPPD). For the two-operand version, we can optimize x.IsNaN().Or(y.IsNaN()) to VCMPPS $3, x, y (not done in this CL). While here, change the name to IsNaN (uppercase both Ns), which matches math.IsNaN. Tests in the next CL. Change-Id: Ib6e7afc2635e6c3c606db5ea16420ee673a6c6d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/733660 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'test/codegen')
0 files changed, 0 insertions, 0 deletions