RFR: 8279508: Auto-vectorize Math.round API [v9]
Sandhya Viswanathan
sviswanathan at openjdk.java.net
Wed Mar 2 23:27:08 UTC 2022
On Sat, 26 Feb 2022 03:38:32 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:
>> I believe the indefinite value should be 2^(w - 1) (a.k.a 0x80000000) and the documentation is typoed. If you look at `cvtss2si`, the indefinite value is also written as 2^w - 1 but yet in `MacroAssembler::convert_f2i` we compare it with 0x80000000. In addition, choosing -1 as an indefinite value is weird enough and to complicate it as 2^w - 1 is really unusual.
>
> `MacroAssembler::convert_f2i`
>
> https://github.com/openjdk/jdk/blob/c5c6058fd57d4b594012035eaf18a57257f4ad85/src/hotspot/cpu/x86/macroAssembler_x86.cpp#L8919
@jatin-bhateja @merykitty You are right, on overflow we observe 2^(w - 1) i.e. 0x8000 0000 so using vector_float_signflip() is correct.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7094
More information about the core-libs-dev
mailing list