This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Match (add x (lsr/asr y c)) -> usra/ssra x y c
ClosedPublic

Authored by bsmith on Jun 17 2022, 4:58 AM.

Diff Detail

Event Timeline

bsmith created this revision.Jun 17 2022, 4:58 AM
bsmith requested review of this revision.Jun 17 2022, 4:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2022, 4:58 AM

Sorry! Your tablegen predicate is HasSVE2orSME. Your .ll target features are sve and sve2?

paulwalker-arm added inline comments.Jun 20 2022, 4:41 AM
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
3230–3250

Rather than adding new patterns can you create a PatFrags instead? See AArch64saba for what I mean.

We may well have other sra related patterns so what about naming the test just sve-sra.ll?

bsmith updated this revision to Diff 438705.Jun 21 2022, 7:59 AM
  • Rework to use PatFrags instead of adding extra patterns
  • Add tests for intrinsic cases
paulwalker-arm accepted this revision.Jun 22 2022, 7:24 AM
This revision is now accepted and ready to land.Jun 22 2022, 7:24 AM
This revision was landed with ongoing or failed builds.Jun 23 2022, 7:57 AM
This revision was automatically updated to reflect the committed changes.
Allen added a subscriber: Allen.Jul 1 2022, 7:28 PM