Skip to content

Commit

Permalink
dnn: vec_neon: avoid redefinition of vcvtnq_s32_f32
Browse files Browse the repository at this point in the history
clang exposes this intrinsic even in 32-bit mode, if targeting >= armv8,
whereas gcc does not, see:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95399
Signed-off-by: Jean-Marc Valin <[email protected]>
  • Loading branch information
mstorsjo authored and jmvalin committed Mar 5, 2024
1 parent ab4e835 commit c1f0f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dnn/vec_neon.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <arm_neon.h>
#include "os_support.h"

#if defined(__arm__) && !defined(__aarch64__)
#if defined(__arm__) && !defined(__aarch64__) && (__ARM_ARCH < 8 || !defined(__clang__))
/* Emulate vcvtnq_s32_f32() for ARMv7 Neon. */
static OPUS_INLINE int32x4_t vcvtnq_s32_f32(float32x4_t x) {
return vrshrq_n_s32(vcvtq_n_s32_f32(x, 8), 8);
Expand Down

0 comments on commit c1f0f54

Please sign in to comment.