-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[AArch64] Add option -msve-streaming-vector-bits= . #144611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c28804a
cb8936f
b772f08
6740565
9e3f500
283ad46
fb4a10d
34e0654
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2261,6 +2261,23 @@ void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { | |
} | ||
} | ||
} | ||
|
||
if (auto *VT = Ty->getAs<VectorType>(); | ||
VT && FD && | ||
(VT->getVectorKind() == VectorKind::SveFixedLengthData || | ||
VT->getVectorKind() == VectorKind::SveFixedLengthPredicate) && | ||
(LangOpts.VScaleMin != LangOpts.VScaleStreamingMin || | ||
LangOpts.VScaleMax != LangOpts.VScaleStreamingMax)) { | ||
if (IsArmStreamingFunction(FD, /*IncludeLocallyStreaming=*/true)) { | ||
Diag(Loc, diag::err_sve_fixed_vector_in_streaming_function) << Ty << 0; | ||
} else if (const auto *FTy = FD->getType()->getAs<FunctionProtoType>()) { | ||
if (FTy->getAArch64SMEAttributes() & | ||
FunctionType::SME_PStateSMCompatibleMask) { | ||
Diag(Loc, diag::err_sve_fixed_vector_in_streaming_function) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for adding a diagnostic for this. Can this restriction be limited to the case where sve-vector-bits != streaming-sve-vector-bits? I think we're also missing a diagnostic for the following case:
and as an extension, we should do the same for:
when we know that their vscale values don't match. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can allow the use of arm_sve_vector_bits in streaming/streaming-compatible functions if the streaming and non-streaming widths are the same, sure. Your last two testcases are the same: the conversion happens in the caller, so the first case reduces to the second. Which is an issue, I guess, but not directly related to this patch. It doesn't involve any fixed-width types. |
||
<< Ty << 1; | ||
} | ||
} | ||
} | ||
}; | ||
|
||
CheckType(Ty); | ||
|
Uh oh!
There was an error while loading. Please reload this page.