[10] RFR(M): 8176506: C2: loop unswitching and unsafe accesses cause crash

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Tue Mar 28 16:36:24 UTC 2017

> http://cr.openjdk.java.net/~roland/8176506/webrev.02/

Looks good.

>> src/share/vm/opto/library_call.cpp:
>>     } else {
>> +    // We know it's an on heap access so base can't be null
>> +    base = must_be_not_null(base, true);
>>       return basic_plus_adr(base, offset);
>>     }
>> Why do you unconditionally apply GK::must_be_not_null() even when base
>> is provably non-null?
> It would be optimized out. Anyway, I followed your suggestion and added
> a check.

Thanks. It goes away only after macro node expansion (since the test is 
hidden behind Opaque4), so my concern was that it can hinder some 

Best regards,
Vladimir Ivanov

More information about the hotspot-compiler-dev mailing list