summaryrefslogtreecommitdiff
path: root/lsh256.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2021-04-21 09:04:30 -0400
committerJeffrey Walton <noloader@gmail.com>2021-04-21 09:04:30 -0400
commit400009fbd9d8fcd12dffb90d98b0a78bb1706c21 (patch)
tree64a282c30b19a10769fa507a38a31b8c579f6a3e /lsh256.cpp
parent11e3435d03d886ab8451132e014350629a996f40 (diff)
downloadcryptopp-git-400009fbd9d8fcd12dffb90d98b0a78bb1706c21.tar.gz
Fix LSH256 compile when AVX is present without AVX2
Diffstat (limited to 'lsh256.cpp')
-rw-r--r--lsh256.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lsh256.cpp b/lsh256.cpp
index 1590e0ac..4a59d7bb 100644
--- a/lsh256.cpp
+++ b/lsh256.cpp
@@ -47,12 +47,6 @@
# endif
#endif
-// Apple and broken compile with -march=native when AVX2 is available.
-// https://travis-ci.org/github/noloader/cryptopp/jobs/767844407
-#if defined(__AVX2__) && defined(CRYPTOPP_APPLE_CLANG_VERSION)
-# undef CRYPTOPP_LSH256_AVX2_AVAILABLE
-#endif
-
#if defined(CRYPTOPP_LSH256_SSE2_AVAILABLE)
# include <emmintrin.h>
#endif
@@ -554,7 +548,7 @@ inline void add_blk(lsh_u32* cv_l, const lsh_u32* cv_r)
CRYPTOPP_ASSERT(cv_l != NULLPTR);
CRYPTOPP_ASSERT(cv_r != NULLPTR);
-#if defined(CRYPTOPP_LSH256_AVX_AVAILABLE)
+#if defined(CRYPTOPP_LSH256_AVX2_AVAILABLE)
_mm256_storeu_si256(M256_CAST(cv_l), _mm256_add_epi32(
_mm256_loadu_si256(CONST_M256_CAST(cv_l)),
_mm256_loadu_si256(CONST_M256_CAST(cv_r))));