-
Bug
-
Resolution: Fixed
-
P3
-
18
AArch64 Vector API double to int may get incorrect results for corner cases.
Current vector double to integer conversion generates code to convert double to long first and then narrow to integer, which does not follow
Java language spec [1], and will get incorrect results for double values larger than Integer.MAX_VALUE or less than Integer.MIN_VALUE.
For those too large/small values, result should be the largest/smallest representable value of type int, but converting to long and
then narrowing to int will get different results.
(We ought to update the test cases as well.)
Current vector double to integer conversion generates code to convert double to long first and then narrow to integer, which does not follow
Java language spec [1], and will get incorrect results for double values larger than Integer.MAX_VALUE or less than Integer.MIN_VALUE.
For those too large/small values, result should be the largest/smallest representable value of type int, but converting to long and
then narrowing to int will get different results.
(We ought to update the test cases as well.)
- relates to
-
JDK-8259948 Aarch64: Add cast nodes for Aarch64 Neon backend
- Resolved