RFR: 8350896: Integer/Long.compress gets wrong type from CompressBitsNode::Value [v12]
    Jatin Bhateja 
    jbhateja at openjdk.org
       
    Fri Jul 11 14:16:03 UTC 2025
    
    
  
> Hi All,
> 
> This bugfix patch fixes incorrect value computation for Integer/Long. compress APIs.
> 
> Problems occur with a constant input and variable mask where the input's value is equal to the lower bound of the mask value., In this case, an erroneous value range estimation results in a constant value. Existing value routine first attempts to constant fold the compression operation if both input and compression mask are constant values; otherwise, it attempts to constrain the value range of result based on the upper and lower bounds of mask type.
> 
> New IR test covers the issue reported in the bug report along with a case for value range based logic pruning.
> 
> Kindly review and share your feedback.
> 
> Best Regards,
> Jatin
Jatin Bhateja has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
  Update test
-------------
Changes:
  - all: https://git.openjdk.org/jdk/pull/23947/files
  - new: https://git.openjdk.org/jdk/pull/23947/files/c94779f5..c79efe09
Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=23947&range=11
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=23947&range=10-11
  Stats: 64 lines in 1 file changed: 0 ins; 0 del; 64 mod
  Patch: https://git.openjdk.org/jdk/pull/23947.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23947/head:pull/23947
PR: https://git.openjdk.org/jdk/pull/23947
    
    
More information about the hotspot-compiler-dev
mailing list