[GlobalIsel][X86] Legalize G_CTPOP and G_CTLZ
authorThorsten Schütt <schuett@gmail.com>
Tue, 16 May 2023 14:58:04 +0000 (16:58 +0200)
committerThorsten Schütt <schuett@gmail.com>
Tue, 16 May 2023 20:13:57 +0000 (22:13 +0200)
commitef1f27d67c4ddc84f346d001af4914beb0ca6a1a
tree156603c5af62ab80178ee729861d915b196f6567
parent0f1a92ba308a20dd4c790843191e3b642e90a9f3
[GlobalIsel][X86] Legalize G_CTPOP and G_CTLZ

G_BSWAP was reverted -> added to this diff.

check plan: ninja check-llvm-codegen-x86

Future work: G_SUB and G_ZEXT need some modernization.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D150677
llvm/lib/Target/X86/X86LegalizerInfo.cpp
llvm/lib/Target/X86/X86LegalizerInfo.h
llvm/test/CodeGen/X86/GlobalISel/legalize-bswap.mir [new file with mode: 0644]
llvm/test/CodeGen/X86/GlobalISel/legalize-constant.mir
llvm/test/CodeGen/X86/GlobalISel/legalize-ctpop.mir [new file with mode: 0644]
llvm/test/CodeGen/X86/GlobalISel/legalize-leading-zeros.mir [new file with mode: 0644]