On Mon, 25 Nov 2024 07:18:41 GMT, Emanuel Peter <[email protected]> wrote:
>> src/hotspot/share/opto/connode.cpp line 49:
>>
>>> 47: switch( t->basic_type() ) {
>>> 48: case T_INT: return new ConINode( t->is_int() );
>>> 49: case T_SHORT: return new ConHNode( t->is_half_float_constant()
>>> );
>>
>> That will be quite confusing.... don't you think?
>
> I mean do we need this? We already have `ConHNode::make` below...?
JVM treats, byte and short as constrained integer type, which is why we create
ConI and not ConB or ConS.
In addition, transform routines of PhaseGVN and PhaseIterGVN use ConNode::make
interface to create a constant IR node, it will not be appropriate to add a
specialization over there. I have modified the check to remove unnecessary
ambiguity while still maintaining the constant creation interface.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21490#discussion_r1857268078