On Thu, 22 Sep 2022 13:23:23 GMT, Raffaello Giulietti <[email protected]> wrote:
>> Reliably reproduces on x86-32 with FPU:
>>
>>
>> $ CONF=linux-x86-server-fastdebug make test
>> TEST=java/lang/Float/Binary16ConversionNaN.java TEST_VM_OPTS="-XX:UseAVX=0
>> -XX:UseSSE=0"
>> ...
>> Roundtrip failure on NaN value 7de2 got back 7fe2
>> Roundtrip failure on NaN value fde2 got back ffe2
>>
>>
>> Since there are many NaN values in FP16 -- basically any non-zero
>> significand works, we should probably just relax the test a bit.
>>
>> Attn @jddarcy ;)
>>
>> Additional testing:
>> - [x] Linux x86_32 fastdebug, `-XX:UseAVX=0 -XX:UseSSE=0`, affected test
>> now passes
>> - [x] Linux x86_64 fastdebug, affected test still passes
>
> test/jdk/java/lang/Float/Binary16ConversionNaN.java line 81:
>
>> 79:
>> 80: private static int sign(short binary16) {
>> 81: return (binary16 & 0xf000);
>
> I think this should read
> `return binary16 & 0x8000;`
Further, if the only modified bit is the quier/signaling bit the test could be
more specific
-------------
PR: https://git.openjdk.org/jdk/pull/10333