RFR: 8256730: Code that uses Object.checkIndex() range checks doesn't optimize well [v4]

Tobias Hartmann thartmann at openjdk.java.net
Thu Dec 10 08:05:39 UTC 2020


On Fri, 4 Dec 2020 14:11:38 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> This was reported by Paul with the vector API. There are 2 issues:
>> 
>> - CastII nodes (added by Objects.checkIndex()) gets in the way of the
>>   pattern matching performed by range check elimination
>> 
>> - By transforming (CastII (AddI x y)) into (AddI (CastII x) (CastII y))
>>   some CastII can be eliminated which improves address computation code.
>
> Roland Westrelin has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - drop extra include, add bugid to test case
>  - Merge branch 'master' into JDK-8256730
>  - CastII pushed thru chain of AddIs
>  - build fix
>  - Merge branch 'master' into JDK-8256730
>  - step over CastII in range checks & push CastII thru add

Looks good to me as well.

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

Marked as reviewed by thartmann (Reviewer).

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


More information about the hotspot-compiler-dev mailing list