RFR: 8370196: C2: Improve (U)MulHiLNode::MulHiValue [v5]

Emanuel Peter epeter at openjdk.org
Tue Nov 18 15:35:39 UTC 2025


On Tue, 18 Nov 2025 15:23:24 GMT, Zihao Lin <duke at openjdk.org> wrote:

>> If nodes both are constant, support constant folding.
>
> Zihao Lin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Apply suggestion from @eme64
>   
>   Co-authored-by: Emanuel Peter <emanuel.peter at oracle.com>

Would it be an idea to still have a `MulHiValue`, and then pass it in a `signed/unsigned` flag? That way we could avoid some code duplication. Because the only difference seems to be `multiply_high_signed` vs `multiply_high_unsigned`, right?

You could even have a method `multiply_high` that takes such a `signedness` flag.

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

PR Review: https://git.openjdk.org/jdk/pull/28097#pullrequestreview-3478417685
PR Comment: https://git.openjdk.org/jdk/pull/28097#issuecomment-3548206118


More information about the hotspot-compiler-dev mailing list