This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SME2] Add SME2 outer product intrinsics
ClosedPublic

Authored by kmclaughlin on Jan 16 2023, 6:52 AM.

Details

Summary

Adds intrinsics for the following:

  • smopa / smops
  • umopa / umops
  • bmopa / bmops

Tests for existing SME mopa/mops intrinsics have also been updated
to use the maximum allowed ZA tile number.

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

Diff Detail

Event Timeline

kmclaughlin created this revision.Jan 16 2023, 6:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2023, 6:52 AM
kmclaughlin requested review of this revision.Jan 16 2023, 6:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 16 2023, 6:52 AM
david-arm added inline comments.Jan 17 2023, 7:25 AM
llvm/lib/Target/AArch64/AArch64SMEInstrInfo.td
569–570

Not saying you should do this as part of this patch, but I wonder if at some point we should change the existing SME smopa/umopa_wide intrinsics to also use int_aarch64_sme_smopa_za32, etc. For example, the smopa (4-way) 8-bit variant.

llvm/lib/Target/AArch64/SMEInstrFormats.td
2850

nit: I just realised this class isn't name correctly. It suggests that it's for binary FP, but actually it's used for bmopa and bmops, both of which are "Bitwise exclusive NOR population count outer product" instructions, i.e. have 32-bit integer inputs. Maybe you could rename this to something like sme2_int_bmopx_tile to avoid confusion?

llvm/test/CodeGen/AArch64/sme2-intrinsics-mop.ll
3

I don't think we need the -mattr=+sve and -mattr=+bf16 here, right?

Matt added a subscriber: Matt.Jan 17 2023, 10:59 AM
kmclaughlin marked 2 inline comments as done.
  • Renamed the sme2_bfp_mopx_tile multiclass to sme2_int_bmopx_tile
  • Removed the -mattr=+sve and -mattr=+bf16 flags from the RUN line in sme2-intrinsics-mop.ll
david-arm accepted this revision.Jan 30 2023, 7:28 AM

LGTM! C'est formidable!

This revision is now accepted and ready to land.Jan 30 2023, 7:28 AM
This revision was landed with ongoing or failed builds.Jan 31 2023, 3:45 AM
This revision was automatically updated to reflect the committed changes.