RFR: 8335392: C2 MergeStores: enhanced pointer parsing [v5]

Emanuel Peter epeter at openjdk.org
Tue Oct 22 07:09:25 UTC 2024


On Tue, 22 Oct 2024 07:05:02 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> src/hotspot/share/opto/noOverflowInt.hpp line 90:
>> 
>>> 88: 
>>> 89:   NoOverflowInt abs() const {
>>> 90:     if (is_NaN()) { return make_NaN(); }
>> 
>> Suggestion:
>> 
>>     if (is_NaN() || value() == min_jint) { return make_NaN(); }
>
> It is not necessary, and I actually test that in my gtest. The subtraction below handles the `min_jint` case.

`ASSERT_TRUE(NoOverflowInt(min_jint).abs().is_NaN());`

But if you insist on it I can add it in.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19970#discussion_r1810071100


More information about the hotspot-compiler-dev mailing list