This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SME2] Add multi-vector fused multiply-add/subtract intrinsics
ClosedPublic

Authored by kmclaughlin on Jan 17 2023, 8:55 AM.

Details

Summary

Adds intrinsics for the following:

  • fmla (single, multi & indexed)
  • fmls (single, multi & indexed)
NOTE: These intrinsics are still in development and are subject to future changes.

Diff Detail

Event Timeline

kmclaughlin created this revision.Jan 17 2023, 8:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 17 2023, 8:55 AM
kmclaughlin requested review of this revision.Jan 17 2023, 8:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 17 2023, 8:55 AM

Hi Kerry,
I had a look and it looks all ok.
I just have a couple of questions if you don't mind.
Carol

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

Should we replace that as well:
s/VectorIndexS/VectorIndexS32b/

2228

And here too:
s/VectorIndexS/VectorIndexS32b/
I am not sure, if this should be replaces, but if so. We should have a look in the other classes here.

llvm/test/CodeGen/AArch64/sme2-intrinsics-fmlas.ll
45

Which instructions should have the first register multiple of two?
Is the fmla? If so the first register in the list is z3.s, no? If so, is this comment correct?

kmclaughlin marked 2 inline comments as done.
  • Updated the multiclasses changed in SMEInstrFormats.td to use VectorIndexS32b_timm/VectorIndexD32b_timm consistently.
  • Removed the _regclass tests for the multiple and single vector intrinsics. Added similar tests for the multiple & indexed vector intrinisics instead.
llvm/test/CodeGen/AArch64/sme2-intrinsics-fmlas.ll
45

You're right, this comment is incorrect. The first register in the list for the 'multiple and single vector' fmla instructions don't need to be multiples of 2 or 4, so I don't think this test is useful.
I've removed this and the @multi_vector_add_single_vg1x4_d_regclass test below and replaced them with similar tests for the multi & indexed instructions instead.

CarolineConcatto accepted this revision.Jan 19 2023, 6:56 AM

Thank you Kerry!
LGTM!

This revision is now accepted and ready to land.Jan 19 2023, 6:56 AM
This revision was landed with ongoing or failed builds.Jan 20 2023, 3:14 AM
This revision was automatically updated to reflect the committed changes.