On Wed, 11 Jun 2025 08:47:56 GMT, Xiaohong Gong <xg...@openjdk.org> wrote:
>> erifan has updated the pull request incrementally with one additional commit >> since the last revision: >> >> Support negating unsigned comparison for BoolTest::mask >> >> Added a static method `negate_mask(mask btm)` into BoolTest class to >> negate both signed and unsigned comparison. > > 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~ ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24674#discussion_r2139615887