This is an archive of the discontinued LLVM Phabricator instance.

[SVE][CodeGen] CTLZ, CTTZ & CTPOP operations (predicates)
ClosedPublic

Authored by kmclaughlin on Jan 11 2021, 9:25 AM.

Details

Summary

Canonicalise the following operations in getNode() for predicate types:

  • CTLZ(Pred) -> bitwise_NOT(Pred)
  • CTTZ(Pred) -> bitwise_NOT(Pred)
  • CTPOP(Pred) -> Pred

Diff Detail

Event Timeline

kmclaughlin created this revision.Jan 11 2021, 9:25 AM
kmclaughlin requested review of this revision.Jan 11 2021, 9:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2021, 9:25 AM
david-arm accepted this revision.Jan 12 2021, 1:15 AM

LGTM! The canonicalisation looks sensible to me.

llvm/test/CodeGen/AArch64/sve-bit-counting-pred.ll
10

nit: Perhaps worth changing this comment to CTPOP to match the intrinsic name, similar to the CTLZ and CTTZ comments below?

This revision is now accepted and ready to land.Jan 12 2021, 1:15 AM
This revision was automatically updated to reflect the committed changes.
kmclaughlin marked an inline comment as done.