RFR: 8335444: Generalize implementation of AndNode mul_ring [v3]

Quan Anh Mai qamai at openjdk.org
Mon Aug 19 18:13:51 UTC 2024


On Mon, 19 Aug 2024 18:06:02 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Jasmine Karthikeyan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Check IR before macro expansion
>
> src/hotspot/share/opto/mulnode.cpp line 601:
> 
>> 599:   typedef typename IntegerType::NativeType NativeType;
>> 600: 
>> 601:   int widen = MAX2(r0->_widen,r1->_widen);
> 
> Suggestion:
> 
>   int widen = MAX2(r0->_widen, r1->_widen);

For example, since `res_uhi = min(uhi1, uhi2)`, your cases regarding one of the inputs being non-negative can be nicely arrived at because for a non-negative `TypeInt`, its unsigned upper bound is the same as its signed upper bound.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20066#discussion_r1722170192


More information about the hotspot-compiler-dev mailing list