[PATCH] D151459: [GlobalIsel][X86] Legalize G_CTLZ and G_CTPOP for 32-bit

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 11:24:03 PDT 2023


arsenm added a comment.

In D151459#4373236 <https://reviews.llvm.org/D151459#4373236>, @RKSimon wrote:

> What about a class that accumulates the supported types through all the subtarget checks and then we call getActionDefinitionsBuilder once at the end with the accumulated list / settings ? I'm not sure what will happen when we start addressing custom legalization cases as well though.
>
> @arsenm Any suggestions?

That’s what I do for some of the AMDGPU cases. Ideally the legal cases are all in the first legalization rule.

Alternatively you can always write an arbitrary legalIf predicate


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151459/new/

https://reviews.llvm.org/D151459



More information about the llvm-commits mailing list