RFR: 8354242: VectorAPI: combine vector not operation with compare [v8]
erifan
duke at openjdk.org
Wed Jun 25 10:16:38 UTC 2025
On Wed, 11 Jun 2025 09:09:57 GMT, erifan <duke at openjdk.org> wrote:
>> src/hotspot/share/opto/vectornode.cpp line 2221:
>>
>>> 2219: // XorV/XorVMask is commutative, swap VectorMaskCmp/VectorMaskCast to in1.
>>> 2220: if (in2->Opcode() == Op_VectorMaskCmp ||
>>> 2221: (in2->Opcode() == Op_VectorMaskCast && in2->in(1)->Opcode() == Op_VectorMaskCmp)) {
>>
>> We may need to consider cases that a `VectorMaskCast` is generated between `compare + not`, such as `compare + cast + not`. For such cases, the element size maybe different for input and output of a `cast`. Although this patch's intention is not for the latter pattern, current change have also covered it well. Could you please add more test/jmh for all kinds of `cast` pattern here? And I think the scope of this PR could be also extended to `compare + cast + not`. WDYT?
>
> Good catch, I'll add more tests and check the correctness. Thanks~
Added more tests for this, thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24674#discussion_r2166350143
More information about the hotspot-compiler-dev
mailing list