On Thu, 19 Mar 2026 07:08:28 GMT, Xiaohong Gong <[email protected]> wrote:
>> I'm not so clear what the pointed `mask` means here? >> >> If the mask is the result of `XorVMask`. If it is used by more than one >> node, I don't think its input `MaskAll` should be cloned. Otherwise, the >> duplicated `machnode` for `MaskAll` will be generated while the backend >> match rule is not matched successfully because the child `XorVMask` is not >> single used. This is just the issue that we want to fix here. >> >> If the mask is `MaskAll` (the all ones vector). If it is used by more than >> one node beyond the `AndNot` pattern, the backend match still will not fire >> because the matcher will mark `MaskAll` as shared. `pd_clone_node()` cannot >> handle such cases at the moment. I investigated how to fix this in the >> matcher, but the solution would add noticeable complexity, which does not >> seem worthwhile given the limited benefit, consider `MaskAll` is a loop >> invariant operation. Therefore, I’d prefer to keep the current behavior, but >> adding a comment here makes sense to me. > > Added a comment before this method. Thanks! > I'm not so clear what the pointed `mask` means here? I meant if the example was something like where the "xor and all true mask" is used by two nodes: VectorMask<Integer> avm, bvm, cvm = ... VectorMask<Integer> xor = alltrue.xor(I_SPECIES.maskAll(true)); VectorMask<Integer> bAndXor = bvm.and(xorAllTrue); VectorMask<Integer> cAndXor = cvm.and(xorAllTrue); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30013#discussion_r2973500922
