RFR: 8282365: Consolidate and improve division by constant idealizations [v39]

Quan Anh Mai qamai at openjdk.org
Sun Dec 24 00:12:11 UTC 2023


On Mon, 18 Dec 2023 17:13:48 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   missing revert
>
> test/hotspot/gtest/opto/test_constant_division.cpp line 66:
> 
>> 64: 
>> 65: template <class T>
>> 66: void magic_divide_constants(T d, T N_neg, T N_pos, juint min_s, T& c, bool& c_ovf, juint& s);
> 
> I don't see any tests here of magic_divide_constants_round_down.

I took the formula quite literally from the paper so I don't think there is a need for a separate test for those cases. It is also covered in the transformation tests from the Java side.

![image](https://github.com/openjdk/jdk/assets/49088128/cc1b1c5e-a37b-4510-9aff-839f0337a532)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/9947#discussion_r1435743303


More information about the hotspot-compiler-dev mailing list