RFR (XS): 8191915: JCK tests produce incorrect results with C2
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Jan 12 13:24:16 UTC 2018
On 12.01.2018 14:22, Rickard Bäckman wrote:
> Added a few comments. I still think I need a second reviewer to OK this.
>
> http://cr.openjdk.java.net/~rbackman/8191915.3/
Looks good to me. Yes, I think a second reviewer would be good because the changes are not trivial.
Best regards,
Tobias
> On 01/11, Tobias Hartmann wrote:
>> Hi Rickard,
>>
>> On 11.01.2018 10:30, Rickard Bäckman wrote:
>>> http://cr.openjdk.java.net/~rbackman/8191915.2/
>>
>> Looks correct to me. Maybe add a comment explaining all the casting.
>>
>> Best regards,
>> Tobias
>>
>>
>>> On 01/10, Andrew Haley wrote:
>>>> On 10/01/18 14:17, Rickard Bäckman wrote:
>>>>> I did the multiply as unsigned and then cast to to signed thing.
>>>>> Renamed the test to LongMulOverflowTest.
>>>>>
>>>>> Updated.
>>>>>
>>>>> http://cr.openjdk.java.net/~rbackman/8191915.1/
>>>>>
>>>>> I agree that the best solution would be to use compiler builtins but I'm
>>>>> not sure all the compilers support them and makes portability a pain.
>>>>
>>>> It's still wrong because
>>>>
>>>> jlong ax = (val1 < 0 ? -val1 : val1);
>>>> jlong ay = (val2 < 0 ? -val2 : val2);
>>>>
>>>> is undefined when val1 or val2 is Long.MIN_VALUE.
>>>>
>>>> --
>>>> Andrew Haley
>>>> Java Platform Lead Engineer
>>>> Red Hat UK Ltd. <https://www.redhat.com>
>>>> EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
>>> /R
>>>
More information about the hotspot-compiler-dev
mailing list