On Tue, 1 Sep 2026 23:55:34 GMT, Xueming Shen <[email protected]> wrote:
> VectorOperators.IS_FINITE, IS_NAN, and IS_INFINITE are floating-point-only
> test operators. Applying one of these operators to an integral vector
> currently reaches the **_if (opKind(op, VO_SPECIAL)) {...}_** handing branch
> implemented in testTemplate and throws AssertionError, instead of reporting
> an unsupported operation.
>
> This change:
>
> - Checks VectorOperators.Test.compatibleWith(...) before executing specially
> implemented test operations.
> - Throws UnsupportedOperationException for incompatible element types in both
> masked and unmasked test(...) operations.
> - Documents UnsupportedOperationException in both public Vector.test(...)
> overloads.
> - Updates VectorLanewiseOpCompatibleWithTest to cover supported and
> unsupported test operators, with and without masks, across the available
> vector species.
>
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK
> Interim AI Policy](https://openjdk.org/legal/ai).
This pull request has now been integrated.
Changeset: 1cab3892
Author: Xueming Shen <[email protected]>
URL:
https://git.openjdk.org/jdk/commit/1cab3892b9c780d9a32160641301c2acc2805852
Stats: 66 lines in 10 files changed: 50 ins; 12 del; 4 mod
8391307: VectorAPI: Floating-point test operators throw AssertionError on
integral vectors
Reviewed-by: psandoz, liach, vlivanov
-------------
PR: https://git.openjdk.org/jdk/pull/32633