[clang] [Clang] Amend SME attributes with support for ZT0. (PR #77941)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 12 08:25:00 PST 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 9803de0e8e3abbbc94a4265d5847db435897a384 6b8d1c8cc772a14a820ab1fdcd6d368b0117d170 -- clang/test/CodeGen/aarch64-sme2-intrinsics/aarch64-sme2-attrs.cpp clang/include/clang/AST/Type.h clang/include/clang/Basic/AttributeCommonInfo.h clang/include/clang/Basic/TokenKinds.h clang/include/clang/Sema/Sema.h clang/lib/AST/TypePrinter.cpp clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CodeGenModule.cpp clang/lib/Parse/ParseDecl.cpp clang/lib/Parse/ParseDeclCXX.cpp clang/lib/Parse/ParseTentative.cpp clang/lib/Sema/SemaChecking.cpp clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaDeclCXX.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaOverload.cpp clang/lib/Sema/SemaType.cpp clang/test/AST/ast-dump-sme-attributes.cpp clang/test/CodeGen/aarch64-sme-intrinsics/aarch64-sme-attrs.cpp clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_add-i32.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_add-i64.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_ld1.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_ld1_vnum.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_ldr.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_mopa-za32.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_mopa-za64.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_mops-za32.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_mops-za64.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_read.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_st1.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_st1_vnum.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_state_funs.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_str.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_write.c clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_zero.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_add.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_bmop.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_fp_dots.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_int_dots.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_ldr_str_zt.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_luti2_lane_zt.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_luti2_lane_zt_x2.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_luti2_lane_zt_x4.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_luti4_lane_zt.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_luti4_lane_zt_x2.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_luti4_lane_zt_x4.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mla.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mlal.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mlall.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mls.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mlsl.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_mop.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_read.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_sub.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_vdot.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_write.c clang/test/CodeGen/aarch64-sme2-intrinsics/acle_sme2_zero_zt.c clang/test/Modules/aarch64-sme-keywords.cppm clang/test/Parser/c2x-attribute-keywords.c clang/test/Parser/cxx0x-keyword-attributes.cpp clang/test/Sema/aarch64-incompat-sm-builtin-calls.c clang/test/Sema/aarch64-sme-func-attrs-without-target-feature.cpp clang/test/Sema/aarch64-sme-func-attrs.c clang/test/Sema/aarch64-sme-intrinsics/acle_sme_imm.cpp clang/test/Sema/aarch64-sme-intrinsics/acle_sme_target.c clang/test/Sema/aarch64-sme2-intrinsics/acle_sme2_imm.cpp clang/utils/TableGen/ClangAttrEmitter.cpp clang/utils/TableGen/SveEmitter.cpp clang/utils/TableGen/TableGen.cpp clang/utils/TableGen/TableGenBackends.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 64d4cde1c9..089704618c 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -7542,9 +7542,10 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto,
           CallerHasZT0State = true;
         else if (const auto *FPT =
                      CallerFD->getType()->getAs<FunctionProtoType>())
-          CallerHasZT0State = FunctionType::getArmZT0State(
-                                 FPT->getExtProtoInfo().AArch64SMEAttributes) !=
-                             FunctionType::ARM_None;
+          CallerHasZT0State =
+              FunctionType::getArmZT0State(
+                  FPT->getExtProtoInfo().AArch64SMEAttributes) !=
+              FunctionType::ARM_None;
       }
 
       if (!CallerHasZT0State)

``````````

</details>


https://github.com/llvm/llvm-project/pull/77941


More information about the cfe-commits mailing list