RFR: 8303762: [vectorapi] Intrinsification of Vector.slice [v2]

Quan Anh Mai qamai at openjdk.org
Wed Mar 8 13:52:18 UTC 2023


On Wed, 8 Mar 2023 00:29:05 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   address reviews
>
> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java line 2289:
> 
>> 2287:             getClass(), byte.class, length(),
>> 2288:             this, that, origin,
>> 2289:             new VectorSliceOp<ByteVector>() {
> 
> Change from inner class to lambda expression?

We still need this method to be inlined and I don't know if there is a way to annotate the lambda function.

> test/hotspot/jtreg/compiler/vectorapi/TestVectorSlice.java line 65:
> 
>> 63:                 Asserts.assertEquals(expected, dst[i][j]);
>> 64:             }
>> 65:         }
> 
> It should be possible to factor out this code into something like this:
> 
>   assertOffsets(length, (expected, i, j) -> Assert.assertEquals((byte)expected, dst[i][j])

Fixed.

> test/hotspot/jtreg/compiler/vectorapi/TestVectorSlice.java line 68:
> 
>> 66: 
>> 67:         length = 16;
>> 68:         testB128(dst, src1, src2);
> 
> Should `dst` be zeroed before the next call? or maybe easier to just reallocate.

Fixed, I just allocate another array.

> test/jdk/jdk/incubator/vector/templates/Kernel-Slice-bop-const.template line 1:
> 
>> 1:         $type$[] a = fa.apply(SPECIES.length());
> 
> Forgot to commit the updated unit tests?

This is for the microbenchmarks generated in the panama-vector repo only.
Thanks a lot.

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

PR: https://git.openjdk.org/jdk/pull/12909


More information about the hotspot-compiler-dev mailing list