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

Xiaohong Gong xgong at openjdk.org
Mon Jun 27 01:44:37 UTC 2022


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.

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

Commit messages:
 - 8287984: AArch64: [vector] Make all bits set vector sharable for match rules

Changes: https://git.openjdk.org/jdk/pull/9292/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9292&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8287984
  Stats: 138 lines in 3 files changed: 127 ins; 1 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/9292.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9292/head:pull/9292

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


More information about the hotspot-compiler-dev mailing list