update-neon-flag-aarch64.patch 822 B

123456789101112131415161718192021222324252627282930313233
  1. From 32ded457c0b1fe78ceb8397632c416568d6714a0 Mon Sep 17 00:00:00 2001
  2. From: Danila Kutenin <[email protected]>
  3. Date: Sat, 17 Aug 2024 19:03:10 -0700
  4. Subject: [PATCH] Update CMakeLists NEON flag to reflect only AArch64 NEON
  5. optimizations
  6. ---
  7. CMakeLists.txt | 7 +++++--
  8. 1 file changed, 5 insertions(+), 2 deletions(-)
  9. diff --git a/CMakeLists.txt b/CMakeLists.txt
  10. index 644df24..b1d072c 100644
  11. --- a/CMakeLists.txt
  12. +++ b/CMakeLists.txt
  13. @@ -206,10 +206,13 @@ int main() {
  14. check_cxx_source_compiles("
  15. #include <arm_neon.h>
  16. +#include <stdint.h>
  17. int main() {
  18. uint8_t val = 3, dup[8];
  19. - uint8x16_t v = vld1q_dup_u8(&val);
  20. - vst1q_u8(dup, v);
  21. + uint8x16_t v1 = vld1q_dup_u8(&val);
  22. + uint8x16_t v2 = vqtbl1q_u8(v1, v1);
  23. + vst1q_u8(dup, v1);
  24. + vst1q_u8(dup, v2);
  25. return 0;
  26. }" SNAPPY_HAVE_NEON)
  27. --
  28. 2.47.1