[PATCH] D100399: [AArch64][GlobalISel] Implement custom legalization for s32 and s64 G_CTPOP

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 13 10:51:29 PDT 2021


paquette created this revision.
paquette added a reviewer: aemerson.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka.
paquette requested review of this revision.
Herald added a project: LLVM.

This is a partial port of `AArch64TargetLowering::LowerCTPOP`.

This custom lowering tries to uses NEON instructions to give a more efficient CTPOP lowering when possible.

In the non-NEON/`noimplicitfloat` case, this should use the generic lowering (see: https://godbolt.org/z/GcaPvWe4x). I think that's worth implementing after implementing the widening code for s16/s8 though.


https://reviews.llvm.org/D100399

Files:
  llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
  llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-ctpop-no-implicit-float.mir
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-ctpop.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100399.337205.patch
Type: text/x-patch
Size: 6716 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210413/fff9ea0b/attachment.bin>


More information about the llvm-commits mailing list