RFR: 8364766: C2: Improve Value() of DivI and DivL for non-constant inputs [v2]

Manuel Hässig mhaessig at openjdk.org
Wed Oct 1 07:31:55 UTC 2025


On Sun, 10 Aug 2025 12:27:55 GMT, Tobias Hotz <duke at openjdk.org> wrote:

>> Tobias Hotz has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fixes after review
>
> Thanks for the fast review! The main reason for all the if cases is that min_int / (-1) is undefined behavior in C++, as it overflows. All code has to be careful that this special case can't happen in C++ code, and that's the main motivation behind all the ifs. I've added a comment that describes that.
> Otherwise, you would be right: Redudant calculations are no problem, min and max would take care of that.
> 
> Regarding testing: I only ran tier1 tests on my machine and GHA

@ichttt, are you still working on this? :slightly_smiling_face:

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

PR Comment: https://git.openjdk.org/jdk/pull/26143#issuecomment-3355104402


More information about the hotspot-compiler-dev mailing list