diff options
| author | Cherry Mui <cherryyz@google.com> | 2025-12-31 02:42:30 -0500 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2026-01-02 12:13:40 -0800 |
| commit | 13440fb51831bfde5804430596d2045a64fd2209 (patch) | |
| tree | 84196ec227a3ed45eee119c10a434169216e9516 /test/codegen | |
| parent | c3550b3352ae283110c443576e1e62cdf8efaa72 (diff) | |
| download | go-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
