RFR(S): 8213419: C2 may hang in MulLNode::Ideal()/MulINode::Ideal() with gcc 8.2.1

dean.long at oracle.com dean.long at oracle.com
Wed Nov 7 21:06:20 UTC 2018

OK, I just wanted to make sure the code was doing what you intended.  
Isn't this still undefined behavior:

jint abs_con = uabs(con);

if the unsigned value is too big to fit in a signed int?


On 11/7/18 4:22 AM, Roland Westrelin wrote:
> Hi Dean,
>> Hi Roland.  Can you explain what happens for INT_MIN now?  It looks like
>> uabs() will return a negative number and sign_flip will be set to false.
> Thanks for looking at this.
> sign_flip is needed to negate the result of the shift. Multiplying by
> INT_MIN only has 2 results: INT_MIN (INT_MIN * 1, INT_MIN * -1) or 0
> (INT_MIN multiplied by any other value). So negation is useless because
> Roland.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20181107/d40ddf36/attachment-0001.html>

More information about the hotspot-compiler-dev mailing list