Using clampScalar here because we ought to mark s128 as custom eventually.
(Right now, it will just fall back.)
With this legalization, we get the same code as SDAG: https://godbolt.org/z/TneoPKrKG
Paths
| Differential D100908
[AArch64][GlobalISel] Legalize narrow type G_CTPOPs ClosedPublic Authored by paquette on Apr 20 2021, 4:16 PM.
Details Summary Using clampScalar here because we ought to mark s128 as custom eventually. (Right now, it will just fall back.) With this legalization, we get the same code as SDAG: https://godbolt.org/z/TneoPKrKG
Diff Detail Event TimelineHerald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka. · View Herald TranscriptApr 20 2021, 4:16 PM
This revision is now accepted and ready to land.May 4 2021, 5:58 PM Closed by commit rG1312852040b3: [AArch64][GlobalISel] Legalize narrow type G_CTPOPs (authored by paquette). · Explain WhyMay 7 2021, 2:52 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 339031 llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
llvm/test/CodeGen/AArch64/GlobalISel/legalize-ctpop.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
|
Could use the guaranteed zeroing I mentioned in the other case to emit uaddlp.4s here.