RFR: 8354242: VectorAPI: combine vector not operation with compare [v8]
Emanuel Peter
epeter at openjdk.org
Wed Jun 11 07:46:31 UTC 2025
On Wed, 11 Jun 2025 07:31:48 GMT, erifan <duke at openjdk.org> wrote:
>> test/hotspot/jtreg/compiler/vectorapi/VectorMaskCompareNotTest.java line 158:
>>
>>> 156: } else if (op == VectorOperators.UGT) {
>>> 157: Asserts.assertEquals(compareUnsigned(a, b) <= 0, r);
>>> 158: }
>>
>> Please refactor it as a `switch`. And add a `default` case where you throw some `RuntimeException`. just to make sure we are not missing anything :)
>
> `VectorOperators.XXX` is not compile time constants, we can't use `switch` here.
Oh. Ok. Well at least add a `RuntimeException` to an `else` branch then, I would suggest :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24674#discussion_r2139441633
More information about the core-libs-dev
mailing list