Integrated: 8367341: C2: apply KnownBits and unsigned bounds to And / Or operations

Quan Anh Mai qamai at openjdk.org
Thu Dec 18 07:34:09 UTC 2025


On Fri, 3 Oct 2025 06:07:50 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> Hi,
> 
> This PR improves the implementation of `AndNode/OrNode/XorNode::Value` by taking advantages of the additional information in `TypeInt`. The implementation is pretty straightforward. A clever trick is that by analyzing the negative and positive ranges of a `TypeInt` separately, we have better info for the leading bits. I also implement gtest unit tests to verify the correctness and monotonicity of the inference functions.
> 
> Please take a look and leave your reviews, thanks a lot.

This pull request has now been integrated.

Changeset: e6780506
Author:    Quan Anh Mai <qamai at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/e67805067a8f537862200e808e20464f12d21c9c
Stats:     964 lines in 9 files changed: 630 ins; 313 del; 21 mod

8367341: C2: apply KnownBits and unsigned bounds to And / Or operations

Reviewed-by: hgreule, epeter

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

PR: https://git.openjdk.org/jdk/pull/27618


More information about the hotspot-dev mailing list