[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 7 09:33:12 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 6a6fcbffbb31f83fab7425d43e28eb6aa39dbfe9 1cc17981a612dcb31fba86c5d64c444f26a44d38 -- clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaDecl.cpp clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_reinterpret_svcount_svbool.c clang/test/CodeGen/aarch64-sve2-intrinsics/acle_sve2_revd.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfadd.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmax.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmaxnm.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmin.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfminnm.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmla.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmls.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfmul.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_bfsub.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_create2_bool.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_get4_bool.c clang/test/CodeGen/aarch64-sve2p1-intrinsics/acle_sve2p1_undef_bool.c clang/test/Sema/aarch64-sme2-sve2p1-diagnostics.c clang/test/Sema/aarch64-sme2p1-diagnostics.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 92f859b714..8b8b970b38 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -2059,7 +2059,8 @@ void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) {
if (!Builtin::evaluateRequiredTargetFeatures("sve", CallerFeatureMap)) {
if (!Builtin::evaluateRequiredTargetFeatures("sme", CallerFeatureMap))
Diag(D->getLocation(), diag::err_sve_vector_in_non_sve_target) << Ty;
- else if (!IsArmStreamingFunction(FD, /*IncludeLocallyStreaming=*/true)) {
+ else if (!IsArmStreamingFunction(FD,
+ /*IncludeLocallyStreaming=*/true)) {
Diag(D->getLocation(), diag::err_sve_vector_in_non_streaming_function)
<< Ty;
}
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 0d11a2acf2..a4e47f3039 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -8987,7 +8987,8 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) {
if (!Builtin::evaluateRequiredTargetFeatures("sme", CallerFeatureMap)) {
Diag(NewVD->getLocation(), diag::err_sve_vector_in_non_sve_target) << T;
NewVD->setInvalidDecl();
- } else if (!IsArmStreamingFunction(FD, /*IncludeLocallyStreaming=*/true)) {
+ } else if (!IsArmStreamingFunction(FD,
+ /*IncludeLocallyStreaming=*/true)) {
Diag(NewVD->getLocation(),
diag::err_sve_vector_in_non_streaming_function)
<< T;
``````````
</details>
https://github.com/llvm/llvm-project/pull/91356
More information about the cfe-commits
mailing list