This is an archive of the discontinued LLVM Phabricator instance.

[AArch64]SME2 Multiple vector ternary int/float 2 and 4 registers
ClosedPublic

Authored by CarolineConcatto on Oct 7 2022, 10:58 AM.

Details

Summary

This patch adds the assembly/disassembly for the following instructions:

For INT: 
        ADD(array results, multiple vectors): Add multi-vector to multi-vector with ZA array vector results.
        SUB(array results, multiple vectors): Subtract multi-vector from multi-vector with ZA array vector results.
For FP: 
       FMLA (multiple vectors): Multi-vector floating-point fused multiply-add.
       FMLS (multiple vectors): Multi-vector floating-point fused multiply-subtract.

The reference can be found here:

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

This patch also adds a  register operand to represent multiples of ZA multi-vectors.

They are:

ZZ_s_mul_r, ZZ_d_mul_r, ZZZZ_s_mul_r and ZZZZ_d_mul_r

and represent the Zn or Zm times 2 or 4 according to the vector group.

Depends on: D135455

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2022, 10:58 AM
CarolineConcatto requested review of this revision.Oct 7 2022, 10:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 7 2022, 10:58 AM
Matt added a subscriber: Matt.Oct 10 2022, 10:51 PM
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
1322

typo?

5531

s/with correct element type/with matching element types/?

5536

s/with correct element type/with matching element types/?

llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
637

Can this just be 30 to reflect the maximum register is z30? I don't really see what value the maths gives us, it's not like the existing functions use 32 - 1.

648

Similar comment as above.

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

too much whitespace

llvm/test/MC/AArch64/SME2/add-diagnostics.s
74–82

These test the "where the first vector is a multiple of" part of the syntax but not the "with correct element type" part. Can you add tests for the matching element type side of thing?

  • Rebase patch base on main
  • Address review’s comments
paulwalker-arm added inline comments.Oct 17 2022, 4:01 AM
llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
648

28?

  • Address review comments
CarolineConcatto marked an inline comment as done.Oct 19 2022, 2:30 AM
CarolineConcatto added inline comments.
llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
648

Yes, sorry!

paulwalker-arm accepted this revision.Oct 19 2022, 5:16 AM
This revision is now accepted and ready to land.Oct 19 2022, 5:16 AM
CarolineConcatto marked an inline comment as done.
  • Create a ZPR2Mul2 and ZPR4Mul4 register class
sdesmalen accepted this revision.Oct 20 2022, 6:52 AM
This revision was landed with ongoing or failed builds.Oct 20 2022, 10:44 AM
This revision was automatically updated to reflect the committed changes.