From b15bcea48132bb8e8c1c2a4a05860cd5b73db5fd Mon Sep 17 00:00:00 2001
From: Leon Anavi <leon.anavi@konsulko.com>
Date: Tue, 25 Nov 2025 08:56:49 +0000
Subject: [PATCH] src/config.h: Enable HAVE_ARM_NEON on AArch64

Only enable HAVE_ARM_NEON on AArch64 because it supports vaddvq and
all needed compiler intrinsics.

Upstream-Status: Submitted [https://github.com/valkey-io/valkey/pull/2873]

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
 src/config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/config.h b/src/config.h
index de0c24dcc..0c6b111a9 100644
--- a/src/config.h
+++ b/src/config.h
@@ -392,7 +392,7 @@ void setcpuaffinity(const char *cpulist);
 #endif
 
 /* Check if we can compile ARM SIMD code */
-#if defined(__ARM_NEON) || defined(__ARM_NEON__)
+#if defined(__aarch64__) && (defined(__ARM_NEON) || defined(__ARM_NEON__))
 #define HAVE_ARM_NEON 1
 #else
 #define HAVE_ARM_NEON 0
-- 
2.47.3

