[lworld+fp16] RFR: 8308363: Initial compiler support for FP16 scalar operations. [v7]
Sandhya Viswanathan
sviswanathan at openjdk.org
Mon Sep 18 22:21:07 UTC 2023
On Mon, 18 Sep 2023 17:32:22 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/hotspot/cpu/x86/x86.ad line 10180:
>>
>>> 10178: ins_encode %{
>>> 10179: __ vmovw($dst$$Register, $src$$XMMRegister);
>>> 10180: __ movswl($dst$$Register, $dst$$Register);
>>
>> Could we do without movswl here?
>
>> Could we do without movswl here?
>
> This was done keeping in mind JVM semantics where byte/short are internally promoted to int type since JVM operands and local variables are 32 bit values.
But this is actually a float16 here (short is only indicating the 16bit storage) and it is not expected to have any integral operation directly on this. The movswl would unnecessarily add to the pathlength.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/848#discussion_r1329335751
More information about the valhalla-dev
mailing list