This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SME2] MOVA tile-to-vector and vector-to-tile should not accept VG suffix
ClosedPublic

Authored by sdesmalen on Jan 12 2023, 4:45 AM.

Diff Detail

Event Timeline

sdesmalen created this revision.Jan 12 2023, 4:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 4:45 AM
sdesmalen requested review of this revision.Jan 12 2023, 4:45 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2023, 4:45 AM
MattDevereau added inline comments.Jan 17 2023, 7:22 AM
llvm/lib/Target/AArch64/SMEInstrFormats.td
3472

Given that vgx2 has been removed from this class is it not misleading to still have vg2 in the class and multiclass name? Same goes for the vgx4 variants.

sdesmalen added inline comments.Jan 18 2023, 6:24 AM
llvm/lib/Target/AArch64/SMEInstrFormats.td
3472

That's probably best done in a separate NFC patch, because it makes this change quite big. It would also mean changing the naming scheme for lots of other instructions (e.g. defm ZIP_VG2_2ZZZ : sme2_zip_vector_vg2<"zip", 0b0>;) which also uses vg2 to mean "two vectors".

MattDevereau accepted this revision.Jan 18 2023, 6:31 AM
MattDevereau added inline comments.
llvm/lib/Target/AArch64/SMEInstrFormats.td
3472

Fair enough, I can see these classes and multiclasses are used in quite a lot of places which wouldn't make sense to touch for a small patch like this.

This revision is now accepted and ready to land.Jan 18 2023, 6:31 AM

Hey Sander,
I am not sure if this class is always used by movaz. In my search it looks it is used by them too.
I also looked at the sme2_mova_tile_or_array_to_vec_aliases, but it looks that one is fine and we don't need to change.

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

Can you check if this class is also used my movaz?
Because if so, then should movaz also not use vgx?

MattDevereau requested changes to this revision.Jan 18 2023, 7:37 AM

On second thought the changes do also affect MOVAZ which seems correct as the tile-to-vector variant doesn't accept the vg suffix, but some tests alongside MOV and MOVA are missing here. Thanks @CarolineConcatto

This revision now requires changes to proceed.Jan 18 2023, 7:37 AM
sdesmalen updated this revision to Diff 490777.Jan 20 2023, 3:56 AM

Rebased on top of D142198 and added test-cases for movaz

MattDevereau accepted this revision.Jan 23 2023, 1:18 AM
This revision is now accepted and ready to land.Jan 23 2023, 1:18 AM