RFR: 8342103: C2 compiler support for Float16 type and associated operations
Sandhya Viswanathan
sviswanathan at openjdk.org
Tue Nov 19 19:57:19 UTC 2024
On Tue, 19 Nov 2024 08:43:06 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/hotspot/cpu/x86/x86.ad line 11015:
>>
>>> 11013: ins_encode %{
>>> 11014: int vlen_enc = vector_length_encoding(this);
>>> 11015: __ evfmadd132ph($dst$$XMMRegister, $src2$$XMMRegister, $src1$$XMMRegister, vlen_enc);
>>
>> Wondering if for auto vectorization the natural fma form is dst = dst + src1 * src2 i.e.
>> match(Set dst (FmaVHF dst (Binary src1 src2)));
>> which then leads to fmadd231.
>
> ISA supports multiple flavors, the current scheme is in line with the wiring of inputs done before matching.
You could save some reg/reg movs with 231 flavor.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21490#discussion_r1848290834
More information about the core-libs-dev
mailing list