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

Hui Shi hshi at openjdk.java.net
Wed Jun 2 14:15:36 UTC 2021


On Wed, 2 Jun 2021 11:31:46 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> Hui Shi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   add test case
>
> 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.

@rwestrel 
for "record_for_igvn" is likely not needed either.  Please help correct my understanding.

In GraphKit::new_array, CastIINode's _range_check_dependency is false and _gvn is not igvn. 
When "_gvn.transform(ccast)" calls CastIINode::Ideal, it either already in for_igvn (goes to "phase->record_for_igvn(this)") or in "post_loop_opts_igvn". 

No need call record_for_igvn again after " _gvn.transform(ccast)".

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

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


More information about the hotspot-compiler-dev mailing list