RFR: 8347459: C2: missing transformation for chain of shifts/multiplications by constants [v5]
Emanuel Peter
epeter at openjdk.org
Mon Mar 10 16:03:08 UTC 2025
On Fri, 7 Mar 2025 16:36:51 GMT, Marc Chevalier <duke at openjdk.org> wrote:
>> src/hotspot/share/opto/mulnode.cpp line 983:
>>
>>> 981: static Node* collapse_nested_shift_left(PhaseGVN* phase, Node* outer_shift, int con0, BasicType bt) {
>>> 982: assert(bt == T_LONG || bt == T_INT, "Unexpected type");
>>> 983: int nbits = bt == T_LONG ? BitsPerJavaLong : BitsPerJavaInteger;
>>
>> Roland is introducing a new method for this in `https://github.com/openjdk/jdk/pull/23438`, see `bits_per_java_integer`. I suggest you use it too ;)
>
> Happily, as soon as this other PR is merged!
Or you just copy it and hope that the merge will eventually be clean, up to you.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23728#discussion_r1987585960
More information about the hotspot-compiler-dev
mailing list