This is an archive of the discontinued LLVM Phabricator instance.

[AArch64]Change printVectorList to print SVE vector range
ClosedPublic

Authored by CarolineConcatto on Oct 14 2022, 1:38 AM.

Details

Summary

This patch has the prefered disassembly changed for SVE vector list.
For instance, instead of printing this assembly:

ld4d { z1.d, z2.d, z3.d, z4.d }, p0/z, [x0]

it will print this:

ld4d { z1.d-z4.d }, p0/z, [x0]

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
CarolineConcatto requested review of this revision.Oct 14 2022, 1:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2022, 1:38 AM
sdesmalen added inline comments.
llvm/test/CodeGen/AArch64/sve-intrinsics-ldN-sret-reg+imm-addr-mode.ll
459

it would be nice to have a space here, e.g. { z0.h - z3.h }.

llvm/test/CodeGen/AArch64/sve-intrinsics-ldN-sret-reg+reg-addr-mode.ll
9

Hi @CarolineConcatto, the vector-lists with two vectors should keep using the comma separated form, which is the preferred syntax for vector-lists as described in the Architecture Reference Manual.

  • Set of two sve registers should be separated by with ','
Matt added a subscriber: Matt.Oct 14 2022, 7:18 AM
sdesmalen added inline comments.Oct 14 2022, 7:23 AM
llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
1469–1473

We should be doing the same for NEON, but I'm happy for that to happen in a different patch.

1475–1492

There should be a fallback to the comma-separated form if the registers are not consecutive, for example when the register wraps as in:

ld4b  { z29.b, z30.b, z31.b, z0.b }, p0/z, [x0, x0]

This should remain a comma-separated list.

It would also be good to have a test for this, in case it doesn't exist yet.

llvm/test/CodeGen/AArch64/sve-merging-stores.ll
1 ↗(On Diff #467739)

This test doesn't need changing at all now that it remains a comma-separated vector list.

llvm/test/tools/llvm-mca/AArch64/A64FX/A64FX-sve-instructions.s
2574

These whitespace changes should not be here.

-Remove wrap-around sve vector list from using range

CarolineConcatto marked 3 inline comments as done.Oct 14 2022, 9:25 AM
CarolineConcatto added inline comments.
llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
1475–1492

I have added at least one test for st3/st4 and ld3/l4

llvm/test/tools/llvm-mca/AArch64/A64FX/A64FX-sve-instructions.s
2574

I removed the white spaces, but it was added by update_mca_test_checks.py.

sdesmalen accepted this revision.Oct 14 2022, 9:28 AM

Nice one, thanks @CarolineConcatto

This revision is now accepted and ready to land.Oct 14 2022, 9:28 AM
This revision was automatically updated to reflect the committed changes.
CarolineConcatto marked 2 inline comments as done.