diff --git a/llvm/lib/Support/BLAKE3/blake3_impl.h b/llvm/lib/Support/BLAKE3/blake3_impl.h --- a/llvm/lib/Support/BLAKE3/blake3_impl.h +++ b/llvm/lib/Support/BLAKE3/blake3_impl.h @@ -54,8 +54,9 @@ #endif #if !defined(BLAKE3_USE_NEON) - // If BLAKE3_USE_NEON not manually set, autodetect based on AArch64ness - #if defined(IS_AARCH64) + // If BLAKE3_USE_NEON not manually set, autodetect based on + // AArch64ness and endianness. + #if defined(IS_AARCH64) && !defined(__ARM_BIG_ENDIAN) #define BLAKE3_USE_NEON 1 #else #define BLAKE3_USE_NEON 0