RFR: 8371446: VectorAPI: Add unit tests for masks from various long values
Paul Sandoz
psandoz at openjdk.org
Fri Dec 5 20:23:58 UTC 2025
On Tue, 2 Dec 2025 00:53:40 GMT, Xueming Shen <sherman at openjdk.org> wrote:
> ### Summary
>
> - Update the existing unit tests for VectorMask to verify the correctness of the hotspot compiler result
> - Add additional test data to the existing VectorMask from/toLong tests.
> - Move the VectorMask binary-op & unary-op tests from Unit-Miscellaneous.template to unit-kernel-template
test/jdk/jdk/incubator/vector/AbstractVectorTest.java line 123:
> 121: boolean[] a = new boolean[l];
> 122: for (int i = 0; i < l; i++) {
> 123: a[i] = (i % 2 == 0);
Suggestion:
a[i] = (i % 5 == 0);
test/jdk/jdk/incubator/vector/templates/Unit-BoolUnary-op.template line 6:
> 4: }
> 5:
> 6: @Test(dataProvider = "maskBinaryOpProvider")
There is already "boolUnaryOpProvider" data provider can we use that and align the naming?
test/jdk/jdk/incubator/vector/templates/Unit-Mask-FromToLong.template line 20:
> 18: long[] r = new long[a.length];
> 19:
> 20: for (int ic = 0; ic < INVOC_COUNT * INVOC_COUNT; ic++) {
Suggestion:
for (int ic = 0; ic < INVOC_COUNT; ic++) {
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28593#discussion_r2593845901
PR Review Comment: https://git.openjdk.org/jdk/pull/28593#discussion_r2593883228
PR Review Comment: https://git.openjdk.org/jdk/pull/28593#discussion_r2593848113
More information about the core-libs-dev
mailing list