On Wed, 11 Jun 2025 05:08:35 GMT, Emanuel Peter <[email protected]> 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 2227:
>
>> 2225: const TypeVect* vector_mask_cast_vt = nullptr;
>> 2226: // in1 should be single used, otherwise the optimization may be
>> unprofitable.
>> 2227: if (in1->Opcode() == Op_VectorMaskCast && in1->outcnt() == 1 &&
>> in1->in(1)->Opcode() == Op_VectorMaskCmp) {
>
> `in1->in(1)->Opcode() == Op_VectorMaskCmp`
> Is this check here even necessary? Because we check it below again, right?
> `in1->Opcode() != Op_VectorMaskCmp`
Btw: do you have a test where `in1->outcnt() > 1`, and you check that the
optimization does not happen with an IR test?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24674#discussion_r2139203141