On Mon, 8 Dec 2025 05:37:54 GMT, Eric Fang <[email protected]> wrote:

>> test/jdk/jdk/incubator/vector/Byte128VectorTests.java line 4191:
>> 
>>> 4189:     }
>>> 4190: 
>>> 4191:     static byte UMINReduce(byte[] a, int idx) {
>> 
>> We should test the reduction operations in a better manner by using `a[idx]` 
>> as the starting value instead.
>
> Hi @merykitty thanks for the review, `a[idx]` is already the starting value 
> for the reduction operation of this function, see line 4193. What do you mean 
> by `a better manner` ?

No, the starting value is `-1`, this test depends on the fact that we choose 
the correct identity value for this particular operation as the starting value, 
which this issue is about. As a result, it would be better to write the test so 
that we do not depend on the identity value.

        byte res = a[idx];
        for (int i = idx + 1; i < (idx + SPECIES.length()); i++) {
            res = (byte) VectorMath.minUnsigned(res, a[i]);
        }

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28692#discussion_r2597119232

Reply via email to