RFR: 8267904: C2 crash when compile negative Arrays.copyOf length after loop [v4]

Hui Shi hshi at openjdk.java.net
Wed Jun 2 14:06:41 UTC 2021


On Wed, 2 Jun 2021 14:00:43 GMT, Hui Shi <hshi at openjdk.org> wrote:

>> src/hotspot/share/opto/graphKit.cpp line 3987:
>> 
>>> 3985:       ccast = _gvn.transform(ccast);
>>> 3986:       record_for_igvn(ccast);
>>> 3987:       replace_in_map(length, ccast);
>> 
>> _gvn.set_type_bottom(ccast);
>> is not needed then. 
>> record_for_igvn(ccast);
>> is likely not needed either. No sure the reason there was no call to transform() in the first place.
>
> Thanks Roland! These codes are stble for a long time.
> 
> "_gvn.set_type_bottom(ccast);" is not needed as type will be set in "_gvn.transform".
> But not sure if it is safe to remove "record_for_igvn".  Could you share more thoughts on it?  
> 
> 
> eee15b163 hotspot/src/share/vm/opto/graphKit.cpp (Chuck Rasbold           2008-09-17 08:29:17 -0700 3984)       _gvn.set_type_bottom(ccast);
> eee15b163 hotspot/src/share/vm/opto/graphKit.cpp (Chuck Rasbold           2008-09-17 08:29:17 -0700 3986)       record_for_igvn(ccast);

FYI.  Tier1/2/3 release/fastdebug build pass when removing "_gvn.set_type_bottom(ccast);" and "record_for_igvn(ccast);"

-------------

PR: https://git.openjdk.java.net/jdk/pull/4238


More information about the hotspot-compiler-dev mailing list