This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add legal types for Streaming SVE
ClosedPublic

Authored by c-rhodes on Jan 30 2022, 4:40 AM.

Details

Summary

The compiler currently crashes for scalable types when compiling with
+sme, e.g.

define <vscale x 4 x i32> @foo(<vscale x 4 x i32> %a) {
  ret <vscale x 4 x i32> %a
}

since it doesn't know how to legalize the types. SME implies a subset of
SVE (+streaming-sve), the hasSVE predication in the backend needs
extending to consider types/operations that are legal in Streaming SVE.

This is the first patch adding legal types <-> register classes. Before
making the change +sve(2) was temporarily replaced with +sme in all the
intrinsics tests to see what failed, and again after making the change.
For all the tests that passed after adding the legal types another RUN
line has been added for +streaming-sve. More patches to follow.

Diff Detail

Event Timeline

c-rhodes created this revision.Jan 30 2022, 4:40 AM
c-rhodes requested review of this revision.Jan 30 2022, 4:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 30 2022, 4:40 AM
Matt added a subscriber: Matt.Jan 31 2022, 8:04 AM

It looks good to me. But I would let someone else give the final decision.
I don't know what are the other consequences of having this merged.
But it looks a reasonable patch. I believe having this approved means fixing the tests in :
https://reviews.llvm.org/D118562

But it looks a reasonable patch. I believe having this approved means fixing the tests in :
https://reviews.llvm.org/D118562

Yeah that patch depends on this.

sdesmalen accepted this revision.Mar 3 2022, 12:36 AM

Apologies for the delay in reviewing, but this looks good to me.

This revision is now accepted and ready to land.Mar 3 2022, 12:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 12:36 AM
This revision was landed with ongoing or failed builds.Mar 3 2022, 1:51 AM
This revision was automatically updated to reflect the committed changes.