RFR: 8347006: LoadRangeNode floats above array guard in arraycopy intrinsic [v2]

Tobias Hartmann thartmann at openjdk.org
Thu Jan 9 10:22:13 UTC 2025


On Wed, 8 Jan 2025 16:09:28 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Tobias Hartmann has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Added missing stopped checks, refactoring and updated copyright dates
>
> src/hotspot/share/opto/library_call.cpp line 5921:
> 
>> 5919:     generate_non_array_guard(load_object_klass(src), slow_region);
>> 5920:     if (!stopped()) {
>> 5921:       src = _gvn.transform(new CheckCastPPNode(control(), src, TypeAryPtr::BOTTOM));
> 
> Why is this a `CheckCastPP` and not a `CastPP`? My understanding is that a `CheckCastPP` is used when we force changing the type of a node (e.g a raw pointer of `Allocate` into a typed pointer), so we do not join the type of the input with that of the output.

Good point, I changed that.

> src/hotspot/share/opto/type.hpp line 1476:
> 
>> 1474: 
>> 1475:   // Convenience common pre-built types.
>> 1476:   static const TypeAryPtr* BOTTOM;
> 
> While you are here it may be better to change the other constant to `TypeAryPtr*` instead of `TypeAryPtr *`

Right, done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22967#discussion_r1908496196
PR Review Comment: https://git.openjdk.org/jdk/pull/22967#discussion_r1908496011


More information about the hotspot-compiler-dev mailing list