This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SME] Disable NEON in streaming mode
ClosedPublic

Authored by c-rhodes on Aug 11 2021, 7:08 AM.

Details

Summary

In streaming mode most of the NEON instruction set is illegal, disable
NEON when compiling with +streaming-sve, unless NEON is explictly
requested.

Subsequent patches will add support for the small subset of NEON
instructions that are legal in streaming mode.

Diff Detail

Event Timeline

c-rhodes created this revision.Aug 11 2021, 7:08 AM
c-rhodes requested review of this revision.Aug 11 2021, 7:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 11 2021, 7:08 AM
Matt added a subscriber: Matt.Aug 11 2021, 9:06 AM
c-rhodes updated this revision to Diff 365960.Aug 12 2021, 4:17 AM

Fix feature.s test, was using dup instruction which aliases mov but the CHECK line checked for dup. Changed to an instruction that doesn't alias to keep it simple.

david-arm added inline comments.Aug 13 2021, 1:04 AM
llvm/test/MC/AArch64/SME/feature.s
13 ↗(On Diff #365960)

nit: This comment is a little confusing to be honest! Particularly the bit that says "if streaming-sve (..) is enabled it's disabled". How about something like:

If no CPU is specified the default is generic which implies NEON. However, in streaming-sve mode
NEON is disabled by default, unless the user has explicitly added the feature.

Or something similar?

c-rhodes updated this revision to Diff 366212.Aug 13 2021, 1:16 AM
c-rhodes set the repository for this revision to rG LLVM Github Monorepo.

Clarify comment

c-rhodes marked an inline comment as done.Aug 13 2021, 1:17 AM
c-rhodes added inline comments.
llvm/test/MC/AArch64/SME/feature.s
13 ↗(On Diff #365960)

nit: This comment is a little confusing to be honest! Particularly the bit that says "if streaming-sve (..) is enabled it's disabled". How about something like:

If no CPU is specified the default is generic which implies NEON. However, in streaming-sve mode
NEON is disabled by default, unless the user has explicitly added the feature.

Or something similar?

that's clearer, updated, cheers

This revision is now accepted and ready to land.Aug 13 2021, 2:13 AM
paulwalker-arm added inline comments.Aug 13 2021, 2:53 AM
llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
60–69

Does this need to be dependent on CPU="Generic"? I'm thinking you may still need to disable NEON even when targeting a known cpu.

I guess I expected some explicit opting in to the fact NEON will be disabled. That's to say I figured the user would explicitly ask for +streaming-sve and by not also explicitly asking for +neon then they are making a conscious choice to disable NEON.

c-rhodes marked an inline comment as done.Aug 13 2021, 3:08 AM
c-rhodes added inline comments.
llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
60–69

Does this need to be dependent on CPU="Generic"? I'm thinking you may still need to disable NEON even when targeting a known cpu.

CPUs with SME support will be defined without FeatureNEON in the features, so this won't be an issue?

I guess I expected some explicit opting in to the fact NEON will be disabled. That's to say I figured the user would explicitly ask for +streaming-sve and by not also explicitly asking for +neon then they are making a conscious choice to disable NEON.

That's what this change implements?

c-rhodes updated this revision to Diff 366240.Aug 13 2021, 4:50 AM
c-rhodes retitled this revision from [AArch64][SME] Disable NEON on generic CPU for streaming mode to [AArch64][SME] Disable NEON in streaming mode.
c-rhodes edited the summary of this revision. (Show Details)

Disable NEON when compiling with +streaming-sve regardless of CPU.

c-rhodes added inline comments.Aug 13 2021, 4:53 AM
llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
60–69

Does this need to be dependent on CPU="Generic"? I'm thinking you may still need to disable NEON even when targeting a known cpu.

CPUs with SME support will be defined without FeatureNEON in the features, so this won't be an issue?

This is incorrect, misunderstanding on my part. CPUs with SME support will also have NEON and as such FeatureNEON will be implied.

I guess I expected some explicit opting in to the fact NEON will be disabled. That's to say I figured the user would explicitly ask for +streaming-sve and by not also explicitly asking for +neon then they are making a conscious choice to disable NEON.

That's what this change implements?

I've updated the patch to disable NEON regardless of CPU if +streaming-sve is specified, unless NEON is explicitly requested.

paulwalker-arm accepted this revision.Aug 13 2021, 5:26 AM
This revision was automatically updated to reflect the committed changes.