RFR: 8367341: C2: apply KnownBits and unsigned bounds to And / Or operations [v2]
    Quan Anh Mai 
    qamai at openjdk.org
       
    Wed Oct 15 09:06:09 UTC 2025
    
    
  
> 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.
Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
  Emanuel's reviews
-------------
Changes:
  - all: https://git.openjdk.org/jdk/pull/27618/files
  - new: https://git.openjdk.org/jdk/pull/27618/files/46ce95fd..b73850d1
Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27618&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27618&range=00-01
  Stats: 43 lines in 3 files changed: 21 ins; 12 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/27618.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27618/head:pull/27618
PR: https://git.openjdk.org/jdk/pull/27618
    
    
More information about the hotspot-compiler-dev
mailing list