On Mon, 5 Oct 2026 04:53:34 GMT, Jatin Bhateja <[email protected]> wrote:

> Hi All,
> 
> Currently Float16Vector.rearrange operations are not intrinsified and are 
> executed through the fallback implementation.
> rearrange is a pure lane-permutation (data movement) operation; it never 
> interprets the 16-bit lane bits as an IEEE binary16
> number. Since a Float16 lane maps to T_SHORT, it reuses the existing 16-bit 
> vector permute backend directly.
> 
> Patch adds Add intrinsification support encompassing the following tasks:
>  - Inline expander extension: allow LT_FLOAT16 past the lane-type guard in 
> inline_vector_rearrange all downstream logic already resolves to the T_SHORT 
> permute path.
>  - Add an IR verification test asserting VectorRearrange is generated for 
> Float16Vector.rearrange with correctness versus the fallback.
> 
> Following are the performance number of benchmarks included with the patch on 
> an AVX512-FP16 target.
> 
> 
> Baseline:-
> Benchmark                                            (vectorDim)   Mode  Cnt  
>   Score   Error   Units
> Float16VectorOperationsBenchmark.rearrangeBenchmark         1024  thrpt    2  
> 217.410          ops/ms
> Float16VectorOperationsBenchmark.rearrangeBenchmark         2057  thrpt    2  
>  93.602          ops/ms
> 
> Withopt:-
> Benchmark                                            (vectorDim)   Mode  Cnt  
>     Score   Error   Units
> Float16VectorOperationsBenchmark.rearrangeBenchmark         1024  thrpt    2  
> 21842.915          ops/ms
> Float16VectorOperationsBenchmark.rearrangeBenchmark         2057  thrpt    2  
>  4047.767          ops/ms
> 
> 
> Please review and share your feedback.
> 
> Best Regards,
> Jatin
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

test/hotspot/jtreg/compiler/vectorapi/TestFloat16VectorRearrange.java line 131:

> 129:     @Check(test = "rearrange64Masked")
> 130:     public void checkRearrange64Masked() {
> 131:         verify_predicated(S64, REV64, ALT64, DST64_MASKED);

just a small nitpick - 
I was wondering if `verify_masked()` would make more sense as the API uses the 
word `mask` everywhere in its definition?

Similarly, `verify_non_predicated()` -> `verify_unmasked()`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33198#discussion_r4537638470

Reply via email to