[PATCH] D111441: [SVE][CodeGen] Add patterns for ADD/SUB + element count

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 8 09:49:46 PDT 2021


kmclaughlin created this revision.
kmclaughlin added reviewers: sdesmalen, david-arm, bsmith, efriedma.
Herald added subscribers: ctetreau, psnobl, hiraditya, kristof.beyls, tschuett.
kmclaughlin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch adds patterns to match the following with INC/DEC:

- @llvm.aarch64.sve.cnt[b|h|w|d] intrinsics + ADD/SUB
- vscale + ADD/SUB

For some implementations of SVE, INC/DEC VL is not as cheap as ADD/SUB and
so this behaviour is guarded by the "use-scalar-inc-vl" feature flag, which for SVE
is off by default. There are no known issues with SVE2, so this feature is
enabled by default when targeting SVE2.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111441

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/lib/Target/AArch64/AArch64.td
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
  llvm/lib/Target/AArch64/AArch64Subtarget.h
  llvm/lib/Target/AArch64/SVEInstrFormats.td
  llvm/test/CodeGen/AArch64/named-vector-shuffles-sve.ll
  llvm/test/CodeGen/AArch64/sve-extract-fixed-vector.ll
  llvm/test/CodeGen/AArch64/sve-gep.ll
  llvm/test/CodeGen/AArch64/sve-insert-element.ll
  llvm/test/CodeGen/AArch64/sve-insert-vector.ll
  llvm/test/CodeGen/AArch64/sve-intrinsics-counting-elems.ll
  llvm/test/CodeGen/AArch64/sve-split-extract-elt.ll
  llvm/test/CodeGen/AArch64/sve-split-insert-elt.ll
  llvm/test/CodeGen/AArch64/sve-stepvector.ll
  llvm/test/CodeGen/AArch64/sve-vl-arith.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111441.378272.patch
Type: text/x-patch
Size: 49955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211008/9237e5b5/attachment.bin>


More information about the llvm-commits mailing list