RFR: 8366444: Add support for add/mul reduction operations for Float16 [v3]

Bhavana Kilambi bkilambi at openjdk.org
Mon Dec 22 16:37:56 UTC 2025


On Fri, 19 Dec 2025 08:55:18 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

>> Bhavana Kilambi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix build failures on Mac
>
> src/hotspot/cpu/aarch64/aarch64_vector.ad line 259:
> 
>> 257:       // implements strictly ordered floating point add reduction which does not require
>> 258:       // the FEAT_FP16 and ASIMDHP checks as SVE supports half-precision floats by default.
>> 259:       case Op_AddReductionVHF:
> 
> Does it need to check `length_in_bytes < 8` for add reduction?

Yes, it would be better to add it. Although when I tested with `MaxVectorSize=4`, it defaults to 8B instead but with the stress flags above, it could possibly fail although it wasn't easy to reproduce. I have still added this check for `AddReductionVHF` instead.

> src/hotspot/cpu/aarch64/aarch64_vector.ad line 392:
> 
>> 390:       case Op_StoreVectorScatter:
>> 391:       case Op_AddReductionVF:
>> 392:       case Op_AddReductionVHF:
> 
> Suggestion:
> 
>       case Op_AddReductionVHF:
>       case Op_AddReductionVF:

Done

> src/hotspot/share/opto/vectornode.hpp line 323:
> 
>> 321:   // is generated through VectorAPI as VectorAPI does not impose any such rules on ordering.
>> 322:   const bool _requires_strict_order;
>> 323: public:
> 
> Suggestion:
> 
>   const bool _requires_strict_order;
> 
> public:

Done

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27526#discussion_r2640473140
PR Review Comment: https://git.openjdk.org/jdk/pull/27526#discussion_r2640474548
PR Review Comment: https://git.openjdk.org/jdk/pull/27526#discussion_r2640473528


More information about the core-libs-dev mailing list