RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v14]

iaroslavski duke at openjdk.org
Tue Aug 15 19:26:11 UTC 2023


On Tue, 15 Aug 2023 19:12:47 GMT, Srinivas Vamsi Parasa <duke at openjdk.org> wrote:

>>> @vamsi-parasa With fastdebug build I see the following error: Internal Error (jdk/src/hotspot/share/opto/escape.cpp:1196), pid=3543536, tid=3543559 fatal error: EA unexpected CallLeaf arraysort_stub
>>> 
>>> Please take a look.
>> 
>> This was fixed as well.
>
>> @vamsi-parasa We need to preserve NaNs. The base (https://github.com/intel/x86-simd-sort) algorithm used doesn't preserve NaNs.
> 
> Thanks for catching this Sandhya! This is fixed now in the most recent commit. A preprocessing step is added to move the NaNs to the top of the array.

Hello @vamsi-parasa !

Do you process negative zeros properly? From one hand -0.0f equals to 0.0f, but negative zeros must be placed before 0.0f.
See javadoc for Arrays.sort(float[] a). The same situation with -0.0d (double type).

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

PR Comment: https://git.openjdk.org/jdk/pull/14227#issuecomment-1679474204


More information about the hotspot-compiler-dev mailing list