RFR: 8267332: xor value should handle bounded values [v6]

Nils Eliasson neliasso at openjdk.java.net
Fri May 21 14:02:38 UTC 2021


On Fri, 21 May 2021 09:59:07 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:

>> In the discussion of https://github.com/openjdk/jdk/pull/3938 a limitation in C2 was found. C2 fails to eliminate obvious bound checks for indexes that are masked with xor.
>> 
>> The Xor for two values that have a lower bound of zero or more, the resulting lower bound is zero.
>> The Xor for two values that have a upperbound above zero, the resulting upper bound is the max of the next_power_of_2-1.
>> 
>> Test supplied. 
>> 
>> Please review,
>> Best regards,
>> Nils Eliasson
>
> Nils Eliasson 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:
> 
>  - Merge branch 'master' into xor_bound
>  - Removed unnecessary check
>  - Updated test, fixed bound
>  - fixed missing test case
>  - Fix bounds check
>  - fix xor value

Thanks for the reviews Tobias and Claes!

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

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


More information about the hotspot-compiler-dev mailing list