On Thu, 13 Nov 2025 19:47:52 GMT, Paul Sandoz <[email protected]> wrote:
>>> The basic type codes are declared and shared across Java and HotSpot - it's
>>> used in `LaneType`. Can we pass a single argument that is the basic type
>>> instead of two arguments. HotSpot should know from the basic type what the
>>> carrier class and also what the operation type without it being explicitly
>>> told, since presumably it knew the inverse - the basic type from the
>>> element class.
>>
>> Hi @PaulSandoz, T_HALFFLOAT used in LaneType is mainly used for
>> differentiation of various cache keys used by conversion operation lookups.
>> In principle, we can extend VM to acknowledge this new custom basic type on
>> the lines of T_METADATA / T_ADDRESS; its scope for now will be restricted to
>> VectorSupport. We can gradually expose this to C2 type, such that TypeVect
>> for all Float16 VectorIR uses T_HALFFLOAT as its basic type; currently, we
>> use T_SHORT as the lane type. Let me know if this looks reasonable
>
>> > The basic type codes are declared and shared across Java and HotSpot -
>> > it's used in `LaneType`. Can we pass a single argument that is the basic
>> > type instead of two arguments. HotSpot should know from the basic type
>> > what the carrier class and also what the operation type without it being
>> > explicitly told, since presumably it knew the inverse - the basic type
>> > from the element class.
>>
>> Hi @PaulSandoz, T_HALFFLOAT used in LaneType is mainly used for
>> differentiation of various cache keys used by conversion operation lookups.
>> In principle, we can extend VM to acknowledge this new custom basic type on
>> the lines of T_METADATA / T_ADDRESS; its scope for now will be restricted to
>> VectorSupport. We can gradually expose this to C2 type, such that TypeVect
>> for all Float16 VectorIR uses T_HALFFLOAT as its basic type; currently, we
>> use T_SHORT as the lane type. Let me know if this looks reasonable
>
> I am proposing something simpler, really as a temporary step until `Float16`
> becomes part of the `java.base` module. IIUC from the basic type we can
> reliably determine what the two arguments we currently passing are e.g.,
> T_HALFFLOAT = { short.class, VECTOR_TYPE_FP16 }. So we don't need to pass two
> arguments, we can just pass one, the intrinsic can lookup the class and
> operation type kind.
Hi @PaulSandoz, I have addressed your comments.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28002#issuecomment-3572377706