RFR: 8364766: C2: Improve Value() of DivI and DivL for non-constant inputs [v2]
    Tobias Hotz 
    duke at openjdk.org
       
    Thu Oct 30 06:54:10 UTC 2025
    
    
  
On Wed, 1 Oct 2025 07:29:24 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:
>> 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:
@mhaessig I've added some new asserts to try and detect where it went wrong and merged the latest upstream. Can you run the failing test again please?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26143#issuecomment-3466352959
    
    
More information about the hotspot-compiler-dev
mailing list