[art] fix -Wimplicit-int-float-conversion

kPrimIntMax and kPrimLongMax are too large in value to be precisely
represented by IEEE 754 single and double precision, respectively.

The code in question is clamping the `value` to the above kConstants.
In this case, the imprecision doesn't result in logical errors. Accept
the imprecision via explicit cast.

Fixes:
art/compiler/optimizing/nodes.cc:1597:22: error: implicit conversion
from 'const int32_t' (aka 'const int') to 'float' changes value from
2147483647 to 2147483648 [-Werror,-Wimplicit-int-float-conversion]
        if (value >= kPrimIntMax)
                  ~~ ^~~~~~~~~~~
art/compiler/optimizing/nodes.cc:1605:22: error: implicit conversion
from 'const int64_t' (aka 'const long') to 'float' changes value from
9223372036854775807 to 9223372036854775808
[-Werror,-Wimplicit-int-float-conversion]
        if (value >= kPrimLongMax)
                  ~~ ^~~~~~~~~~~~
art/compiler/optimizing/nodes.cc:1629:22: error: implicit conversion
from 'const int64_t' (aka 'const long') to 'double' changes value from
9223372036854775807 to 9223372036854775808
[-Werror,-Wimplicit-int-float-conversion]
        if (value >= kPrimLongMax)
                  ~~ ^~~~~~~~~~~~

Bug: 139945549
Test: mm
Change-Id: I60582c13cfaceb6c6b217e13d7e9bd04d94874fe
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
1 file changed