This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add target features for Armv9-A Scalable Matrix Extension (SME)
ClosedPublic

Authored by c-rhodes on Jul 7 2021, 11:26 AM.

Details

Summary

First patch in a series adding MC layer support for the Arm Scalable
Matrix Extension.

This patch adds the following features:

sme, sme-i64, sme-f64

The sme-i64 and sme-f64 flags are for the optional I16I64 and F64F64
features.

If a target supports I16I64 then the following instructions are
implemented:

  • 64-bit integer ADDHA and ADDVA variants (D105570).
  • SMOPA, SMOPS, SUMOPA, SUMOPS, UMOPA, UMOPS, USMOPA, and USMOPS instructions that accumulate 16-bit integer outer products into 64-bit integer tiles.

If a target supports F64F64 then the FMOPA and FMOPS instructions that
accumulate double-precision floating-point outer products into
double-precision tiles are implemented.

Outer products are implemented in D105571.

The reference can be found here:
https://developer.arm.com/documentation/ddi0602/2021-06

Diff Detail

Event Timeline

c-rhodes created this revision.Jul 7 2021, 11:26 AM
c-rhodes requested review of this revision.Jul 7 2021, 11:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 7 2021, 11:26 AM
Matt added a subscriber: Matt.Jul 7 2021, 3:01 PM
sdesmalen added inline comments.Jul 8 2021, 12:13 AM
llvm/lib/Target/AArch64/AArch64.td
433

Just an observation that this isn't strictly correct, since it only requires the 'streaming' subset of SVE(2) instructions, rather than the full SVE(2) set. I know you're currently working on a patch for this at the moment, so maybe you can add a FIXME here for the meantime.

c-rhodes updated this revision to Diff 357155.Jul 8 2021, 1:07 AM

Add FIXME to highlight +sme implying +sve2 is temporary.

c-rhodes marked an inline comment as done.Jul 8 2021, 1:07 AM

If it is not too pedantic maybe add in the commit message the reasoning for the 3 features (sme, sme-i64, sme-f64).

llvm/test/MC/AArch64/SME/feature.s
1

should add RUN for the other 2 new features (sme-i64, sme-f64) too?

c-rhodes updated this revision to Diff 357432.Jul 9 2021, 1:25 AM
c-rhodes edited the summary of this revision. (Show Details)
c-rhodes marked an inline comment as done.Jul 9 2021, 1:27 AM

If it is not too pedantic maybe add in the commit message the reasoning for the 3 features (sme, sme-i64, sme-f64).

thanks for comments Carol, I've updated the commit message hopefully makes more sense now.

CarolineConcatto accepted this revision.Jul 9 2021, 3:03 AM

Thank you @c-rhodes
The patch LGTM.

This revision is now accepted and ready to land.Jul 9 2021, 3:03 AM
This revision was landed with ongoing or failed builds.Jul 12 2021, 6:28 AM
This revision was automatically updated to reflect the committed changes.