RFR: 8352585: Add special case handling for Float16.max/min x86 backend [v5]
Jatin Bhateja
jbhateja at openjdk.org
Fri Mar 28 04:53:17 UTC 2025
On Thu, 27 Mar 2025 13:14:39 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review comments resolution
>
> I have not looked at the x64 instructions, but only the tests again.
>
> I have noticed that you only cover specific values. You could improve tests with this:
> - Add non-canonical NaN values.
> - Just iterate over all possible Float16 input pairs. It's onls `2^32`, that should be feasible! Then compare compiled vs interpreted results.
>
> It seems that bugs like these happen because somehow we do not systematically cover all inputs. Maybe we should do the same for all Float16 operations?
Hi @eme64 ,
This specific issues is around special Float16 values i.e +/- 0.0 and NaN.
I have added a Generator for Float16 as part of https://github.com/openjdk/jdk/pull/22755
Best Regards,
Jatin
> test/hotspot/jtreg/compiler/intrinsics/float16/TestFloat16MaxMinSpecialValues.java line 57:
>
>> 55: @Run(test = "testMaxNaNOperands")
>> 56: public void launchMaxNaNOperands() {
>> 57: RES = testMaxNaNOperands(SRC, Float16.NaN);
>
> You are not only using the "canonical" `NaN` in the tests. Are there not other encodings?
DONE
I created a custom NaN generator to generate canonical NaN values.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24169#issuecomment-2760176991
PR Review Comment: https://git.openjdk.org/jdk/pull/24169#discussion_r2017912662
More information about the hotspot-compiler-dev
mailing list