RFR: 8279508: Auto-vectorize Math.round API [v9]

Sandhya Viswanathan sviswanathan at openjdk.java.net
Wed Mar 2 23:32:07 UTC 2022


On Sat, 26 Feb 2022 01:07:47 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8279508: Adding descriptive comments.
>
> src/hotspot/cpu/x86/x86.ad line 7295:
> 
>> 7293:     __ vector_round_double_evex($dst$$XMMRegister, $src$$XMMRegister, $xtmp1$$XMMRegister,
>> 7294:                                 $xtmp2$$XMMRegister, $ktmp1$$KRegister, $ktmp2$$KRegister,
>> 7295:                                 ExternalAddress(vector_double_signflip()), new_mxcsr, $scratch$$Register, vlen_enc);
> 
> The vector_double_signflip() here should be replaced by vector_all_bits_set().
> vcvtpd2qq description:
> If a converted result cannot be represented in the destination
> format, the floating-point invalid exception is raised, and if this exception is masked, the indefinite integer value
> (2w-1, where w represents the number of bits in the destination format) is returned.

The overflow value observed is 2^(w-1) so using vector_double_signflip() is correct, please ignore this comment.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7094


More information about the core-libs-dev mailing list