RFR: 8287052: comparing double to max_intx gives unexpected results

Vladimir Kozlov kvn at openjdk.java.net
Fri May 20 20:15:54 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++).

I approve current fix because changing values limits of product flag requires CSR.

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

Marked as reviewed by kvn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list