RFR: 8356813: Improve Mod(I|L)Node::Value [v4]
Hannes Greule
hgreule at openjdk.org
Mon Jun 2 12:55:50 UTC 2025
On Mon, 2 Jun 2025 11:44:36 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> We use `g_uabs()` to get the absolute value, that should't exceed 2^31 for int values (i.e., `g_uabs(min_jint) == 2^31`). So we should get into the right range here again. But I guess I can expand the comment to better explain that part.
>
> @SirYwell I'm not 100% sure here, so please correct me if I'm wrong.
> You are now always passing in a `jlong` value, so you always use `static inline julong g_uabs(jlong n) { return g_uabs((julong)n); }`, even for `T_INT`.
Yes that's correct, and it should still work due to how negation works for negative inputs.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25254#discussion_r2121069875
More information about the hotspot-compiler-dev
mailing list