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
Fri Nov 9 17:30:54 UTC 2018
On 11/9/18 2:38 AM, Roland Westrelin wrote:
>> 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.
OK, I missed that. That addresses my concern.
>> 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.
OK. I'll leave it up to you which way you want to go with this fix.
dl
> Roland.
More information about the hotspot-compiler-dev
mailing list