On Fri, 3 Oct 2025 12:14:46 GMT, Quan Anh Mai <[email protected]> wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Update countbitsnode.cpp
>
> src/hotspot/share/opto/countbitsnode.cpp line 145:
> 
>> 143:   }
>> 144:   KnownBits<juint> bits = t->isa_int()->_bits;
>> 145:   return TypeInt::make(population_count(bits._ones), 
>> population_count(~bits._zeros), Type::WidenMax);
> 
> The `widen` of the output should be the same as the `widen` of the input, not 
> `WidenMax` here.

Thanks @merykitty, widen is mainly used for optimistic data flow analysis pass 
like CCP where type analysis begins with TOP and progressively grows the value 
range till convergence / fixed point.
it's good to preserve the widen of input to delay eager convergence.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27075#discussion_r2403728728

Reply via email to