RFR: 8345766: C2 should emit macro nodes for ModF/ModD instead of calls during parsing [v6]

Theo Weidmann tweidmann at openjdk.org
Fri Jan 10 08:06:42 UTC 2025


On Thu, 9 Jan 2025 16:57:58 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Actually the assignment further down from `as_Call` fails, so I'll leave it with CallNode.
>
> I have typo in my original question. What I meant to ask is: why you have cast only for ModDNode and not for ModFNode?

The cast is there to make the C++ type checker happy. It's fine if the right hand side of the `:` is a subtype of the left hand side (like my code above with the cast) but the compiler cannot automatically deduce a super type of both the lhs and rhs as the type for the expression (which would be required if I remove the cast). I could, of course, add a cast to the rhs too, but it's not necessary, so I left it off.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22786#discussion_r1909965917


More information about the hotspot-compiler-dev mailing list