[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:10:56 PDT 2021
aemerson added a comment.
In D106494#2903324 <https://reviews.llvm.org/D106494#2903324>, @aemerson wrote:
> 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>
Ah but these are going to be assigned to the FPR banks. We might be able to recognize the extend to s128 pattern and select the optimal code during selection.
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