G_CTPOP is generated from llvm.ctpop.<type> intrinsics, clang generates
these intrinsics from builtin_popcount and builtin_popcountll.
Add lower and narrow scalar for G_CTPOP.
Lower G_CTPOP for MIPS32.
Details
Details
Diff Detail
Diff Detail
Paths
| Differential D73216
[MIPS GlobalISel] Select population count (popcount) ClosedPublic Authored by Petar.Avramovic on Jan 22 2020, 10:13 AM.
Details Summary G_CTPOP is generated from llvm.ctpop.<type> intrinsics, clang generates
Diff Detail Event Timeline
This revision is now accepted and ready to land.Jan 23 2020, 5:41 AM Closed by commit rGcbf03aee6d81: [MIPS GlobalISel] Select population count (popcount) (authored by Petar.Avramovic). · Explain WhyJan 27 2020, 1:01 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 239641 llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
llvm/test/CodeGen/Mips/GlobalISel/legalizer/ctpop.mir
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/ctpop.ll
|
Assumes NarrowTy == OrigTy / 2. This one should be easy to handle for any divisible type.