RFR: 8354242: VectorAPI: combine vector not operation with compare [v9]
Emanuel Peter
epeter at openjdk.org
Tue Jul 8 08:59:44 UTC 2025
On Tue, 8 Jul 2025 05:56:58 GMT, erifan <duke at openjdk.org> wrote:
>> The current testing status for the conditions you listed:
>>> 1. Not MaskCmp.
>>
>> **No test for it, tested locally**, Because I think this condition is too straightforward.
>>
>>> 2. More than one use.
>>
>> **Tested**, see `VectorMaskCompareNotTest.java line 1118`.
>>
>>> predicate negatable and vector not all ones.
>>
>> **Tested**, see `VectorMaskCompareNotTest.java line 1126`.
>>
>>> predicate not negatable and vector not all ones.
>>
>> **No test for it**, because we have tests for `predicate not negatable` or `vector not all ones`. If either is `false`, return nullptr.
>>
>>> predicate negatable and vector all ones.
>>
>> **A lot of tests for it**. For example `VectorMaskCompareNotTest.java line 1014`.
>>
>>> predicate not negatable and vectors all ones.
>>
>> **Tested**, see `VectorMaskCompareNotTest.java line 1222`.
>
>> Indentation for clarity.
>
> Done.
>
> I think we have enough negative tests. Please take a look at this PR, thanks~
Thanks for your answers @erifan !
Can you please answer these as well?
> predicate cannot be negated AND the vector is all ones. Can you explain this condition?
A code comment would be helpful for this case. I'm a little bit struggling to understand the bracket/negation here.
> Why do you guard against VectorNode::is_all_ones_vector(in2) at all?
Is this necessary? Why?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24674#discussion_r2191900155
More information about the core-libs-dev
mailing list