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

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 11:26:28 PDT 2023


tschuett added a comment.

In D151459#4373265 <https://reviews.llvm.org/D151459#4373265>, @arsenm wrote:

> 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

It looks similarly messy. The widen rules will differ between the different vector widths.


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