RFR: 8370196: C2: Improve (U)MulHiLNode::MulHiValue
Andrew Haley
aph at openjdk.org
Mon Nov 10 10:58:02 UTC 2025
On Sat, 1 Nov 2025 14:50:27 GMT, Zihao Lin <duke at openjdk.org> wrote:
> If nodes both are constant, support constant folding.
src/hotspot/share/opto/mulnode.cpp line 622:
> 620: const TypeLong *longType1 = t1->is_long();
> 621: const TypeLong *longType2 = t2->is_long();
> 622: if(longType1 && longType2 && longType1->is_con() && longType2->is_con()){
Suggestion:
if(longType1 != nullptr && longType2 != nullptr && longType1->is_con() && longType2->is_con()){
I know, it seems a bit fussy, but that's the way we do it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28097#discussion_r2509939997
More information about the hotspot-compiler-dev
mailing list