On Tue, 8 Jul 2025 11:41:01 GMT, Emanuel Peter <epe...@openjdk.org> wrote:
>> The purpose of this PR is optimizing the following kinds of patterns: >> >> XXXVector va, vb; >> va.compare(EQ, vb).not() >> >> And the generated IR of `va.compare(EQ, vb).not()` is `(XorVMask >> (VectorMaskCmp va vb EQ) (MaskAll -1))`. On platforms like aarch64 NEON, >> `MaskAll` is `Replicate`. And `MaskAll` and `Replicate` are both all ones >> vectors, so we do this check `VectorNode::is_all_ones_vector(in2)` > > Oh wow, my bad. I misunderstood the brackets! > > Instead of: > > !(in1->as_VectorMaskCmp())->predicate_can_be_negated() || > !VectorNode::is_all_ones_vector(in2)) { > > I read: > > !(in1->as_VectorMaskCmp()->predicate_can_be_negated() || > !VectorNode::is_all_ones_vector(in2))) { > > That confused me a lot... absolutely my bad. > > Well actually then my indentation suggestion was terrible! I made a new suggestion below. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24674#discussion_r2192263852