Integrated: 8267332: xor value should handle bounded values

Nils Eliasson neliasso at openjdk.java.net
Fri May 21 14:11:34 UTC 2021


On Thu, 20 May 2021 21:14:14 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

This pull request has now been integrated.

Changeset: 4ba76138
Author:    Nils Eliasson <neliasso at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/4ba761381c60197be08d34580b92b5203fa9b189
Stats:     166 lines in 2 files changed: 166 ins; 0 del; 0 mod

8267332: xor value should handle bounded values

Reviewed-by: thartmann, redestad

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

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


More information about the hotspot-compiler-dev mailing list