RFR: 8282162: [vector] Optimize vector negation API
Xiaohong Gong
xgong at openjdk.java.net
Tue Mar 15 02:50:43 UTC 2022
On Tue, 15 Mar 2022 02:39:42 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> Note that in terms of Java semantics, negation of floating point values needs to be implemented as subtraction from negative zero rather than positive zero:
>
> double negate(double arg) {return -0.0 - arg; }
>
> This is to handle signed zeros correctly.
Hi @jddarcy ,thanks for looking at this PR and thanks for the notes on the floating point negation! Yeah, this really makes sense to me. Kindly note that this patch didn't touch the negation of the floating point values. For Vector API, the vector floating point negation has been intrinsified to `NegVF/D` node by compiler that we directly generate the negation instructions for them. Thanks!
-------------
PR: https://git.openjdk.java.net/jdk/pull/7782
More information about the core-libs-dev
mailing list