[PATCH] D102077: [AArch64][SVE] Combine cntp intrinsics with add/sub to produce incp/decp

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 10 11:39:08 PDT 2021


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/SVEInstrFormats.td:678-686
+  // Combine cntp with combine_op
+  def : Pat<(i64 (combine_op GPR64:$Rn, (int_aarch64_sve_cntp (nxv16i1 (SVEAllActive)), (nxv16i1 PPRAny:$pred)))),
+            (!cast<Instruction>(NAME # _B) PPRAny:$pred, $Rn)>;
+  def : Pat<(i64 (combine_op GPR64:$Rn, (int_aarch64_sve_cntp (nxv8i1 (SVEAllActive)), (nxv8i1 PPRAny:$pred)))),
+            (!cast<Instruction>(NAME # _H) PPRAny:$pred, $Rn)>;
+  def : Pat<(i64 (combine_op GPR64:$Rn, (int_aarch64_sve_cntp (nxv4i1 (SVEAllActive)), (nxv4i1 PPRAny:$pred)))),
+            (!cast<Instruction>(NAME # _S) PPRAny:$pred, $Rn)>;
----------------
Looking at some of the numbers in `AArch64SchedA64FX.td` I think it's worth limiting this pattern to the case where this is the only use of `int_aarch64_sve_cntp`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102077/new/

https://reviews.llvm.org/D102077



More information about the llvm-commits mailing list