[vectorIntrinsics] RFR: 8255437: [vector] jdk/incubator/vector/SelectFromByteMaxVectorTests fails with Arm SVE 2048-bits
Paul Sandoz
psandoz at openjdk.java.net
Thu Oct 29 16:25:56 UTC 2020
On Thu, 29 Oct 2020 06:22:35 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:
> The tests are used to test the Vector API "selectFrom". It uses index values stored in the lanes of this vector which is a byte vector for byte type. So its valid lane elements should be 0 ~ 127 for byte.
>
> However, for SVE 2048-bits, the max vector length for byte is 256, which exceeds the byte boundary. Indexes greater than 127 are converted to the negative values which are invalid for the API.
>
> To avoid this, it's better to guarantee the elements in the byte vector to the valid values if they are prepared to be used as vector indexes.
>
> See more details from:
> https://mail.openjdk.java.net/pipermail/panama-dev/2020-October/011216.html
Marked as reviewed by psandoz (Committer).
test/jdk/jdk/incubator/vector/templates/Unit-header.template line 1187:
> 1185: withToStringBi("shuffle[random]", (Integer l, Integer m) -> {
> 1186: $type$[] a = new $type$[l];
> 1187: #if[ByteMax]
You could probably simplify this a bit by rename argument `m` to `upper` and updating it for `ByteMax`, thereby the loop code remains the same.
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/19
More information about the panama-dev
mailing list