[PATCH] D93607: [SVE] Lower vector CTLZ, CTPOP and CTTZ operations.

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 20 17:08:11 PST 2020


paulwalker-arm created this revision.
Herald added subscribers: NickHung, psnobl, hiraditya, tschuett.
Herald added a reviewer: efriedma.
paulwalker-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

CTLZ and CTPOP are lowered to CLZ and CNT instructions respectively.

CTTZ is not a native SVE operation but is instead lowered to:

  CTTZ(V) => CTLZ(BITREVERSE(V))

In the case of fixed-length support using SVE we also lower CTTZ
operating on NEON sized vectors because of its reliance on
BITREVERSE which is also lowered to SVE intructions at these lengths.

Depends on D93606 <https://reviews.llvm.org/D93606>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93607

Files:
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.h
  llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
  llvm/lib/Target/AArch64/SVEInstrFormats.td
  llvm/test/CodeGen/AArch64/sve-bit-counting.ll
  llvm/test/CodeGen/AArch64/sve-fixed-length-bit-counting.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93607.313007.patch
Type: text/x-patch
Size: 60260 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201221/4e406f95/attachment-0001.bin>


More information about the llvm-commits mailing list