[clang] [Clang][ARM] Make CRC and DSP intrinsics always available. (PR #107417)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 5 08:59:23 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 1693d8eb9aa94b0e8e2395234e6c63b57a2017b7 9dadc9bffc40e02dff9ef6a1d79968c8980892f4 --extensions c,h -- clang/lib/Headers/arm_acle.h clang/test/CodeGen/arm_acle.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Headers/arm_acle.h b/clang/lib/Headers/arm_acle.h
index b1dc90f84a..48801c38f1 100644
--- a/clang/lib/Headers/arm_acle.h
+++ b/clang/lib/Headers/arm_acle.h
@@ -265,28 +265,34 @@ __rbitl(unsigned long __t) {
/* 8.3 16-bit multiplications */
#if defined(__ARM_32BIT_STATE) && __ARM_32BIT_STATE
-static __inline__ int32_t __attribute__((__always_inline__,__nodebug__, target("dsp")))
-__smulbb(int32_t __a, int32_t __b) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smulbb(int32_t __a, int32_t __b) {
return __builtin_arm_smulbb(__a, __b);
}
-static __inline__ int32_t __attribute__((__always_inline__,__nodebug__, target("dsp")))
-__smulbt(int32_t __a, int32_t __b) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smulbt(int32_t __a, int32_t __b) {
return __builtin_arm_smulbt(__a, __b);
}
-static __inline__ int32_t __attribute__((__always_inline__,__nodebug__, target("dsp")))
-__smultb(int32_t __a, int32_t __b) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smultb(int32_t __a, int32_t __b) {
return __builtin_arm_smultb(__a, __b);
}
-static __inline__ int32_t __attribute__((__always_inline__,__nodebug__, target("dsp")))
-__smultt(int32_t __a, int32_t __b) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smultt(int32_t __a, int32_t __b) {
return __builtin_arm_smultt(__a, __b);
}
-static __inline__ int32_t __attribute__((__always_inline__,__nodebug__, target("dsp")))
-__smulwb(int32_t __a, int32_t __b) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smulwb(int32_t __a, int32_t __b) {
return __builtin_arm_smulwb(__a, __b);
}
-static __inline__ int32_t __attribute__((__always_inline__,__nodebug__, target("dsp")))
-__smulwt(int32_t __a, int32_t __b) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smulwt(int32_t __a, int32_t __b) {
return __builtin_arm_smulwt(__a, __b);
}
#endif
@@ -305,46 +311,55 @@ __smulwt(int32_t __a, int32_t __b) {
/* 8.4.2 Saturating addition and subtraction intrinsics */
#if defined(__ARM_32BIT_STATE) && __ARM_32BIT_STATE
-static __inline__ int32_t __attribute__((__always_inline__, __nodebug__, target("dsp")))
-__qadd(int32_t __t, int32_t __v) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __qadd(int32_t __t, int32_t __v) {
return __builtin_arm_qadd(__t, __v);
}
-static __inline__ int32_t __attribute__((__always_inline__, __nodebug__, target("dsp")))
-__qsub(int32_t __t, int32_t __v) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __qsub(int32_t __t, int32_t __v) {
return __builtin_arm_qsub(__t, __v);
}
-static __inline__ int32_t __attribute__((__always_inline__, __nodebug__, target("dsp")))
-__qdbl(int32_t __t) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __qdbl(int32_t __t) {
return __builtin_arm_qadd(__t, __t);
}
#endif
/* 8.4.3 Accumulating multiplications */
#if defined(__ARM_32BIT_STATE) && __ARM_32BIT_STATE
-static __inline__ int32_t __attribute__((__always_inline__, __nodebug__, target("dsp")))
-__smlabb(int32_t __a, int32_t __b, int32_t __c) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smlabb(int32_t __a, int32_t __b, int32_t __c) {
return __builtin_arm_smlabb(__a, __b, __c);
}
-static __inline__ int32_t __attribute__((__always_inline__, __nodebug__, target("dsp")))
-__smlabt(int32_t __a, int32_t __b, int32_t __c) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smlabt(int32_t __a, int32_t __b, int32_t __c) {
return __builtin_arm_smlabt(__a, __b, __c);
}
-static __inline__ int32_t __attribute__((__always_inline__, __nodebug__, target("dsp")))
-__smlatb(int32_t __a, int32_t __b, int32_t __c) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smlatb(int32_t __a, int32_t __b, int32_t __c) {
return __builtin_arm_smlatb(__a, __b, __c);
}
-static __inline__ int32_t __attribute__((__always_inline__, __nodebug__, target("dsp")))
-__smlatt(int32_t __a, int32_t __b, int32_t __c) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smlatt(int32_t __a, int32_t __b, int32_t __c) {
return __builtin_arm_smlatt(__a, __b, __c);
}
-static __inline__ int32_t __attribute__((__always_inline__, __nodebug__, target("dsp")))
-__smlawb(int32_t __a, int32_t __b, int32_t __c) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smlawb(int32_t __a, int32_t __b, int32_t __c) {
return __builtin_arm_smlawb(__a, __b, __c);
}
-static __inline__ int32_t __attribute__((__always_inline__, __nodebug__, target("dsp")))
-__smlawt(int32_t __a, int32_t __b, int32_t __c) {
+static __inline__ int32_t
+ __attribute__((__always_inline__, __nodebug__, target("dsp")))
+ __smlawt(int32_t __a, int32_t __b, int32_t __c) {
return __builtin_arm_smlawt(__a, __b, __c);
}
#endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/107417
More information about the cfe-commits
mailing list