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

Roland Westrelin rwestrel at redhat.com
Fri Nov 9 10:38:14 UTC 2018


> It looks like log2_intptr() here is converting bit1 from unsigned to signed:

I changed the signature of log2_intptr() to take an unsigned int so I
don't think there's any conversion.

> and bit1 can be 0x80000000 unless I'm missing something.  If INT_MIN
> is the only problem, can we just have special handling for INT_MIN, and
> leave the rest of the code unchanged:
>
>      if (con == INT_MIN) {
>          ...
>          return ...
>      }
>
>      bool sign_flip = false;
> if( con < 0 ) {
> con = -con;
>
>        sign_flip = true;
>      }
> [...]

Right. That's another way of dealing with this. But introducing uabs()
and changing the log2_intptr() signature is also likely required for
other part of the code.

Roland.


More information about the hotspot-compiler-dev mailing list