RFR: 8352585: Add special case handling for Float16.max/min x86 backend [v2]

Jatin Bhateja jbhateja at openjdk.org
Fri Mar 21 20:33:47 UTC 2025


> 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:

  Minor cleanup

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24169/files
  - new: https://git.openjdk.org/jdk/pull/24169/files/824d6fbb..d1fd0d84

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24169&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24169&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/24169.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24169/head:pull/24169

PR: https://git.openjdk.org/jdk/pull/24169


More information about the hotspot-compiler-dev mailing list