JDK-8372978 : [VectorAPI] Fix incorrect identity values in UMIN/UMAX reductions
  • Type: Bug
  • Component: core-libs
  • Affected Version: 24
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2025-12-03
  • Updated: 2025-12-08
Related Reports
Causes :  
Duplicate :  
Duplicate :  
Description
The original implementation of UMIN/UMAX reductions in JDK-8346174
used incorrect identity values in the Java fallback implementation
and test code.

Problem:
--------
UMIN was using MAX_OR_INF (signed maximum value) as the identity:
  - Byte.MAX_VALUE (127) instead of max unsigned byte (255)
  - Short.MAX_VALUE (32767) instead of max unsigned short (65535)
  - Integer.MAX_VALUE instead of max unsigned int (-1)
  - Long.MAX_VALUE instead of max unsigned long (-1)

UMAX was using MIN_OR_INF (signed minimum value) as the identity:
  - Byte.MIN_VALUE (-128) instead of 0
  - Short.MIN_VALUE (-32768) instead of 0
  - Integer.MIN_VALUE instead of 0
  - Long.MIN_VALUE instead of 0

This caused incorrect result. For example:
  UMAX([42,42,...,42]) returned 128 instead of 42
Comments
A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/28692 Date: 2025-12-08 03:22:31 +0000
08-12-2025

Oh, I didn't notice that. Let me ask in that JBS. If Xueming Shen is not working on it I'll fix the bug. I'll close this ticket later.
03-12-2025

This is a duplicate of https://bugs.openjdk.org/browse/JDK-8358767
03-12-2025

I'll submit the fix soon.
03-12-2025