Integrated: 8352585: Add special case handling for Float16.max/min x86 backend
Jatin Bhateja
jbhateja at openjdk.org
Thu Apr 3 09:25:38 UTC 2025
On Fri, 21 Mar 2025 20:20:24 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
This pull request has now been integrated.
Changeset: f7a94fee
Author: Jatin Bhateja <jbhateja at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/f7a94feedd63775a09d0bcb9ef3313972e2a5d69
Stats: 260 lines in 6 files changed: 254 ins; 6 del; 0 mod
8352585: Add special case handling for Float16.max/min x86 backend
Reviewed-by: epeter, sviswanathan
-------------
PR: https://git.openjdk.org/jdk/pull/24169
More information about the hotspot-compiler-dev
mailing list