Page MenuHomePhabricator

[AArch64][GlobalISel] Fallback to generic lowering of G_CTPOP
ClosedPublic

Authored by dzhidzhoev on Aug 8 2022, 5:05 PM.

Details

Summary

Use generic lowering of G_CTPOP for s32 and s64 scalars when
noimplicitfloat is specified.

Diff Detail

Event Timeline

dzhidzhoev created this revision.Aug 8 2022, 5:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 5:05 PM
dzhidzhoev requested review of this revision.Aug 8 2022, 5:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 5:05 PM

Rebase & ping

paquette added inline comments.Aug 17 2022, 10:52 AM
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
1231

I think this can be simplified into a one-liner?

return Ty.isScalar() && (Size == 32 || Size == 64) &&
       Helper.lowerBitCount(MI) == LegalizerHelper::LegalizeResult::Legalized;

Also can you add a comment explaining why you want this behaviour?

Addressing @paquette comment.

This revision is now accepted and ready to land.Aug 17 2022, 11:09 AM
This revision was landed with ongoing or failed builds.Aug 17 2022, 11:11 AM
This revision was automatically updated to reflect the committed changes.