Skip to content

Commit 705fb5e

Browse files
authored
Fix: Equality check on NEON (#197)
The `vmaxvq_u8` should be replaced with `vminvq_u8` to make the `sz_equal_neon` function actually work.
1 parent 2af873a commit 705fb5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/stringzilla/stringzilla.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5818,7 +5818,7 @@ SZ_PUBLIC sz_bool_t sz_equal_neon(sz_cptr_t a, sz_cptr_t b, sz_size_t length) {
58185818
a_vec.u8x16 = vld1q_u8((sz_u8_t const *)a);
58195819
b_vec.u8x16 = vld1q_u8((sz_u8_t const *)b);
58205820
uint8x16_t cmp = vceqq_u8(a_vec.u8x16, b_vec.u8x16);
5821-
if (vmaxvq_u8(cmp) != 255) { return sz_false_k; } // Check if all bytes match
5821+
if (vminvq_u8(cmp) != 255) { return sz_false_k; } // Check if all bytes match
58225822
}
58235823

58245824
// Handle remaining bytes

0 commit comments

Comments
 (0)