This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Combine cntp intrinsics with add/sub to produce incp/decp
ClosedPublic

Authored by bsmith on May 7 2021, 8:29 AM.

Diff Detail

Event Timeline

bsmith created this revision.May 7 2021, 8:29 AM
bsmith requested review of this revision.May 7 2021, 8:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 7 2021, 8:29 AM
Matt added a subscriber: Matt.May 7 2021, 8:37 AM
llvm/lib/Target/AArch64/SVEInstrFormats.td
683–691

Looking at some of the numbers in AArch64SchedA64FX.td I think it's worth limiting this pattern to the case where this is the only use of int_aarch64_sve_cntp.

bsmith updated this revision to Diff 344844.May 12 2021, 8:54 AM
  • Only perform combine when it is the only use of cntp
paulwalker-arm accepted this revision.May 13 2021, 3:10 AM
paulwalker-arm added inline comments.
llvm/test/CodeGen/AArch64/sve-cntp-combine.ll
138

I argue this should be twouse or multiuse.

This revision is now accepted and ready to land.May 13 2021, 3:10 AM