[PATCH] D106494: WIP: [AArch64][GlobalISel] Legalize ctpop s128

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 25 14:06:59 PDT 2021


aemerson added a comment.

In D106494#2898851 <https://reviews.llvm.org/D106494#2898851>, @jroelofs wrote:

> In D106494#2898756 <https://reviews.llvm.org/D106494#2898756>, @paquette wrote:
>
>> Do you have any idea of how to improve the zext behaviour?
>
> I was thinking about making `narrowScalar` do: `zext(add(trunc(ctpop(hi)), trunc(ctpop(lo)))` with the hope that some combine folds the inner `trunc(zext(ctpop(x))) => ctpop(x)`, but I haven't tried this yet.

For the s32 -> s64 case, that should be folded to a G_ZEXT by D106768 <https://reviews.llvm.org/D106768>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106494



More information about the llvm-commits mailing list