This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Lower fixed-length vector_shuffle to SVE splat if possible
ClosedPublic

Authored by benmxwl-arm on Nov 14 2022, 10:17 AM.

Details

Summary

This adds an extra case to check if a vector_shuffle for a fixed-length
vector that's being lowered to SVE, is just a splat. Doing this avoids
a round trip to the stack and back for a few cases.

Diff Detail

Event Timeline

benmxwl-arm created this revision.Nov 14 2022, 10:17 AM
benmxwl-arm requested review of this revision.Nov 14 2022, 10:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2022, 10:17 AM
Matt added a subscriber: Matt.Nov 14 2022, 1:52 PM
c-rhodes accepted this revision.Nov 15 2022, 7:19 AM

I've just left one suggestion but otherwise LGTM

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
23072

unsigned?

This revision is now accepted and ready to land.Nov 15 2022, 7:19 AM
  • Added some more test cases (these were previously broken in the same way as the ones you see fixed in the diff)
  • int -> unsigned
benmxwl-arm marked an inline comment as done.Nov 16 2022, 2:04 AM
This revision was landed with ongoing or failed builds.Nov 16 2022, 3:48 AM
This revision was automatically updated to reflect the committed changes.