This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SME2] Add multi-vector zip/uzp intrinsics
ClosedPublic

Authored by david-arm on Jan 30 2023, 8:50 AM.

Details

Summary

This patch adds the LLVM IR intrinsics for the following:

  • zip (2 and 4 vectors, 8 to 64-bit elements) - aarch64.sve.zip.*
  • zip (2 and 4 vectors, 128-bit elements) - aarch64.sve.zipq.*
  • uzp (2 and 4 vectors, 8 to 64-bit elements) - aarch64.sve.uzp.*
  • uzp (2 and 4 vectors, 128-bit elements) - aarch64.sve.uzpq.*

I have created separate intrinsics for the 128-bit variants
in a similar way to what was done for int_aarch64_sme_readq_horiz.
This permits us to use any vector type (<vscale x 16 x i8>, etc.)
for the 128-bit versions.

I have also named the tests sve2p1-intrinsics-* because although
the instructions are added as part of the SME2 feature they only
operate on SVE vectors.

NOTE: These intrinsics are still in development and are subject to future changes.

Diff Detail

Event Timeline

david-arm created this revision.Jan 30 2023, 8:50 AM
david-arm requested review of this revision.Jan 30 2023, 8:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 30 2023, 8:50 AM
kmclaughlin added inline comments.Feb 1 2023, 3:34 AM
llvm/test/CodeGen/AArch64/sve2p1-intrinsics-uzpx4.ll
7

Can you please add an %unused argument to these tests, to make sure the lists start at multiples of 4?

david-arm updated this revision to Diff 493903.Feb 1 2023, 4:22 AM
  • Added unused parameters to the x4 tests and changed x2 tests to ensure we're testing the destination register starts at a multiple of 2.
david-arm marked an inline comment as done.Feb 1 2023, 4:22 AM
kmclaughlin accepted this revision.Feb 2 2023, 7:01 AM
This revision is now accepted and ready to land.Feb 2 2023, 7:01 AM
This revision was automatically updated to reflect the committed changes.