[compiler-rt] [AArch64][compiler-rt] Add a function returning the current vector length (PR #92921)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 07:48:45 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 03eba209852c769ab6993be3bc01cdcc57d787b0 1038d54920dbfc6dbdad0842074f8dba463a9f35 -- compiler-rt/lib/builtins/aarch64/sme-abi-init.c
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/lib/builtins/aarch64/sme-abi-init.c b/compiler-rt/lib/builtins/aarch64/sme-abi-init.c
index 331ec4b634..f8a47773b0 100644
--- a/compiler-rt/lib/builtins/aarch64/sme-abi-init.c
+++ b/compiler-rt/lib/builtins/aarch64/sme-abi-init.c
@@ -56,16 +56,14 @@ static void init_aarch64_has_sme(void) {
 #if __GNUC__ >= 9
 #pragma GCC diagnostic ignored "-Wprio-ctor-dtor"
 #endif
-__attribute__((constructor(90)))
-void get_aarch64_cpu_features(void) {
+__attribute__((constructor(90))) void get_aarch64_cpu_features(void) {
   if (!__aarch64_cpu_features.features)
     __init_cpu_features();
 }
 
-__attribute__((target("sve")))
-long emit_cntd(void) {
+__attribute__((target("sve"))) long emit_cntd(void) {
   long vl;
-  __asm__ __volatile__("cntd %0" : "=r" (vl));
+  __asm__ __volatile__("cntd %0" : "=r"(vl));
   return vl;
 }
 

``````````

</details>


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


More information about the llvm-commits mailing list