This is an archive of the discontinued LLVM Phabricator instance.

[AArch64]SME2 single-multi and multi-multi INT/FP dot product instructions
ClosedPublic

Authored by CarolineConcatto on Oct 11 2022, 8:48 AM.

Details

Summary

This patch adds the assembly/disassembly for the following instruction:
INT:

SDOT (2-way, multiple and single vector): Multi-vector signed integer dot-product by vector.
     (2-way, multiple vectors): Multi-vector signed integer dot-product.
UDOT (2-way, multiple and single vector): Multi-vector unsigned integer dot-product by vector.
     (2-way, multiple vectors): Multi-vector unsigned integer dot-product.
SUDOT (multiple and indexed vector): Multi-vector signed by unsigned integer dot-product by indexed elements.
      (multiple and single vector): Multi-vector signed by unsigned integer dot-product by vector.
USDOT (multiple and single vector): Multi-vector unsigned by signed integer dot-product by vector.
      (multiple vectors): Multi-vector unsigned by signed integer dot-product.

FP:

BFDOT(multiple and single vector): Multi-vector BFloat16 floating-point dot-product by vector.
      (multiple vectors): Multi-vector BFloat16 floating-point dot-product.

FDOT (multiple and single vector): Multi-vector half-precision floating-point dot-product by vector.
     (multiple vectors): Multi-vector half-precision floating-point dot-product.

For set of 2 and 4 ZA registers

The reference can be found here:

https://developer.arm.com/documentation/ddi0602/2022-09

Depends on:D135455

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 8:48 AM
CarolineConcatto requested review of this revision.Oct 11 2022, 8:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 8:48 AM
Matt added a subscriber: Matt.Oct 11 2022, 11:47 AM
CarolineConcatto edited the summary of this revision. (Show Details)

Rebase to update the tests vector list output

paulwalker-arm added inline comments.Oct 22 2022, 6:04 AM
llvm/lib/Target/AArch64/SMEInstrFormats.td
2129–2130

This to me looks almost identical too sme2_mla_add_sub_array_vg2_multi which makes sense given they share the same encoding parent SME2 Multi-vector - Multiple Array Vectors (Two registers). I think you're focusing too much on trying to share instruction definitions between vg2 and vg4 whereas looking at the encoding groups they typically sit in different tables. This means your having to create far more instruction/base classes than you need to.

I'm not saying everything in SME2 Multi-vector - Multiple Array Vectors (Two registers) can be represented using a single instruction/base class but many take the form ZA.S[<Wv>, <imm>{, VGx2}], { <Zn1>.?-<Zn2>.? }, { <Zm1>.?-<Zm2>.? } and so I'd expect much more reuse than is currently the case.

CarolineConcatto retitled this revision from [AArch64]SME2 single-multi and multi-multi FP dot product instructions to [AArch64]SME2 single-multi and multi-multi INT/FP dot product instructions.
CarolineConcatto edited the summary of this revision. (Show Details)

Create a generic multiclass for each class
Update old sme2_mla_add_sub_array_vg24_single to be sme2_dot_mla_add_sub_array_vg24_single

paulwalker-arm accepted this revision.Oct 25 2022, 8:44 AM

Looking at the parent encoding groups I think you could have included more instructions very cheaply but what's here looks good to me.

This revision is now accepted and ready to land.Oct 25 2022, 8:44 AM
This revision was landed with ongoing or failed builds.Oct 25 2022, 10:29 AM
This revision was automatically updated to reflect the committed changes.