RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v3]

Paul Sandoz psandoz at openjdk.org
Tue Dec 17 00:17:41 UTC 2024


On Mon, 16 Dec 2024 18:47:50 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Adding more test points
>
> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float16.java line 1415:
> 
>> 1413:         // double; not necessary to widen to double before the
>> 1414:         // multiply.
>> 1415:         short fa = float16ToRawShortBits(a);
> 
> The new implementations in fma and sqrt are comparatively long and obscure compared to the current versions. That might be the price of intrinsification, but it would be helpful to at least have a comment to the reader explaining why the more obvious code was not being used.

@jatin-bhateja could we change the intrinsic to declare the three Float16 values as additional parameters which are only ever passed to the lambda? I believe when intrinsic we will just drop those extra parameters.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22754#discussion_r1887733028


More information about the hotspot-compiler-dev mailing list