This is an archive of the discontinued LLVM Phabricator instance.

[CostModel][AArch64] Fix ctpop intrinsic cost when NEON is disabled.
ClosedPublic

Authored by efriedma on Sep 1 2022, 2:16 PM.

Details

Summary

If we don't have NEON, we use the generic fallback, which takes 12 instructions. Make sure the costs reflect that.

(On a related note, we could optimize the generic fallback a bit. It currently uses sequences like lsr+and+add; if we use and+lsr+add instead, we can fold the lsr into the add. But I'm not planning to look into that at the moment.)

Diff Detail

Event Timeline

efriedma created this revision.Sep 1 2022, 2:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2022, 2:16 PM
efriedma requested review of this revision.Sep 1 2022, 2:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2022, 2:16 PM
dmgreen accepted this revision.Sep 2 2022, 1:46 AM

12 sounds good. LGTM

This revision is now accepted and ready to land.Sep 2 2022, 1:46 AM