Skip to content

Commit

Permalink
[ARM] Override Clang x4 NEON intrinsics for Android
Browse files Browse the repository at this point in the history
* Clang for Android requires 256-bit alignment for x4 loads and stores, which can't be guaranteed and is unnecessary
  • Loading branch information
mtl1979 authored and Dead2 committed Mar 5, 2024
1 parent 7750531 commit af494fc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/arm/neon_intrins.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
out.val[3] = vqsubq_u16(a.val[3], b); \
} while (0)

# if defined(__clang__) && defined(__arm__) && defined(__ANDROID__)
/* Clang for 32-bit Android has too strict alignment requirement (:256) for x4 NEON intrinsics */
# undef ARM_NEON_HASLD4
# undef vld1q_u16_x4
# undef vld1q_u8_x4
# undef vst1q_u16_x4
# endif

# ifndef ARM_NEON_HASLD4

Expand Down

0 comments on commit af494fc

Please sign in to comment.