This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE2] Add the SVE2.1 signed and unsigned 2-way dot instructions
ClosedPublic

Authored by david-arm on Oct 21 2022, 9:37 AM.

Details

Summary

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

SDOT : Signed integer 2-way dot product indexed and non-indexed
UDOT : Unsigned integer 2-way dot product, indexed and non-indexed

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

Diff Detail

Event Timeline

david-arm created this revision.Oct 21 2022, 9:37 AM
david-arm requested review of this revision.Oct 21 2022, 9:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 21 2022, 9:37 AM
paulwalker-arm accepted this revision.Oct 22 2022, 6:34 AM
paulwalker-arm added inline comments.
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
3585–3588

For clarity, can you create a follow up patch to ensure all the SVE dot instructions use this format? This presumably means adding 4WAY.

llvm/test/MC/AArch64/SVE2p1/sdot-diagnostics.s
2

Given the positive tests include movprfx, is it worth adding negative tests to ensure a suitable error is given when prefixed with a predicated movprfx?

This revision is now accepted and ready to land.Oct 22 2022, 6:34 AM
sdesmalen added inline comments.Oct 24 2022, 1:10 AM
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
3585–3588

We should be using VG2 or VG4 for that purpose, that aligns with what we've done for SME2

paulwalker-arm added inline comments.Oct 24 2022, 2:58 AM
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
3585–3588

VG2/4 relates to instruction operands that are multi-register. Here 2WAY relates to the instruction's operation, which in this case only take single register operands. For earlier versions of SVE there was no distinction because all the dot instructions were 4WAY. This now changes with SVE2p1, hence my suggestion.

llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
3585–3588

Just noting D135676 shows a different naming scheme (e.g. BtoH and BtoS). This also works to distinguish between 2-way and 4-way so either are good options but we need to choose one and stick with it.

Matt added a subscriber: Matt.Oct 24 2022, 10:51 AM
sdesmalen added inline comments.Oct 25 2022, 1:04 AM
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
3585–3588

Here 2WAY relates to the instruction's operation

Of course, I should have looked more closely before I posted.

This also works to distinguish between 2-way and 4-way so either are good options but we need to choose one and stick with it.

In that case, I'd prefer to align with D135676 and use _HtoS.

This revision was landed with ongoing or failed builds.Oct 25 2022, 3:26 AM
This revision was automatically updated to reflect the committed changes.
david-arm marked 4 inline comments as done.
david-arm marked an inline comment as done.Oct 25 2022, 3:27 AM
david-arm added inline comments.
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
3585–3588

Renamed to be SDOT_ZZZ_HtoS, etc.