RFR: 8287984: AArch64: [vector] Make all bits set vector sharable for match rules

Nick Gasson ngasson at openjdk.org
Thu Jun 30 08:35:46 UTC 2022


On Mon, 27 Jun 2022 01:37:03 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

> We have the optimized rules for vector not/and_not in NEON and SVE, like:
> 
> 
>  match(Set dst (XorV src (ReplicateB m1)))              ; vector not
>  match(Set dst (AndV src1 (XorV src2 (ReplicateB m1)))) ; vector and_not
> 
> 
> where "`m1`" is a ConI node with value -1. And we also have the similar rules for vector mask in SVE like:
> 
> 
>  match(Set pd (AndVMask pn (XorVMask pm (MaskAll m1)))) ; mask and_not
> 
> 
> These rules are not easy to be matched since the "`Replicate`" or "`MaskAll`" node is usually not single used for the `not/and_not` operation. To make these rules be matched as expected, this patch adds the vector (mask) "`not`" pattern to `Matcher::pd_clone_node()` which makes the all bits set vector `(Replicate/MaskAll)` sharable during matching rules.

The `cpu/aarch64` changes look OK.

-------------

Marked as reviewed by ngasson (Reviewer).

PR: https://git.openjdk.org/jdk/pull/9292


More information about the hotspot-compiler-dev mailing list