Integrated: 8287052: comparing double to max_intx gives unexpected results

Dean Long dlong at openjdk.java.net
Fri May 20 20:26:55 UTC 2022


On Fri, 20 May 2022 01:03:02 GMT, Dean Long <dlong at openjdk.org> wrote:

> It isn't safe to compare a double to 2^63-1 because the latter will be changed to 2^63 when converting to a double.
> This fixes a compiler warning with clang-12 and prevents the code from returning a negative value in some cases (observed on x64 with g++).

This pull request has now been integrated.

Changeset: ba23f140
Author:    Dean Long <dlong at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/ba23f14025f42bdb3bc831782b2f11443d1c572c
Stats:     9 lines in 1 file changed: 6 ins; 2 del; 1 mod

8287052: comparing double to max_intx gives unexpected results

Reviewed-by: kvn

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

PR: https://git.openjdk.java.net/jdk/pull/8798


More information about the hotspot-compiler-dev mailing list