diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-08-27 01:09:39 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-08-27 01:09:39 +0200 |
commit | 1254842c5dc23e2534c201deead4b4012a4faa54 (patch) | |
tree | 7a5884f39e453ef51612efdfda3942c61c51d2cb /c | |
parent | 3b59bedbbb6e4aeaa584d14157aa92255b3a7031 (diff) |
Diffstat (limited to 'c')
-rw-r--r-- | c/simd-isascii/isascii.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/c/simd-isascii/isascii.c b/c/simd-isascii/isascii.c index 24ef4fc..9e2b11a 100644 --- a/c/simd-isascii/isascii.c +++ b/c/simd-isascii/isascii.c @@ -36,9 +36,7 @@ strisascii_avx2(const unsigned char *s, size_t n) { __m256i msk = _mm256_set1_epi8((char)(1 << 7)); while (n >= sizeof(__m256i)) { - __m256i v = - _mm256_and_si256(_mm256_loadu_si256((const __m256i *)s), msk); - if (_mm256_movemask_epi8(v) != 0) + if (_mm256_testz_si256(_mm256_loadu_si256((__m256i *)s), msk) == 0) return false; s += sizeof(__m256i); n -= sizeof(__m256i); |