RFR: 8352585: Add special case handling for Float16.max/min x86 backend [v4]
Sandhya Viswanathan
sviswanathan at openjdk.org
Wed Mar 26 18:40:11 UTC 2025
On Wed, 26 Mar 2025 11:21:02 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> This bugfix patch adds the special handling as per x86 AVX512-FP16 ISA specification[1][2] to compute max/min operations with +/-0.0 or NaN operands.
>>
>> Special handling leverage the instruction semantic, central idea is to shuffle the operands such that smaller input gets assigned to second operand for min operation or a larger input gets assigned to second operand for max operation, in addition result equals NaN if an unordered comparison detects first input as a NaN value else we return the result of min/max operation.
>>
>> Kindly review and share your feedback.
>>
>> Best Regards,
>> Jatin
>>
>> [1] https://www.felixcloutier.com/x86/vminsh
>> [2] https://www.felixcloutier.com/x86/vmaxsh
>
> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>
> Review comments resolutions
test/hotspot/jtreg/compiler/intrinsics/float16/TestFloat16MaxMinSpecialValues.java line 50:
> 48:
> 49: @Test
> 50: @IR(counts = {IRNode.MAX_HF, " >0 "}, applyIfCPUFeatureAnd = {"avx512_fp16", "true", "avx512bw", "true"})
Missing avx512vl check here and other places below.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24169#discussion_r2014800161
More information about the hotspot-compiler-dev
mailing list