File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -4908,9 +4908,10 @@ static bool mb_fast_check_utf8_default(zend_string *str)
4908
4908
for (; i <= len - 16 ; i += 16 ) {
4909
4909
int8x16_t current_bytes = vld1q_s8 ((int8_t * )(p + i ));
4910
4910
/* top bit is all 0, it is ASCII */
4911
- if (vmaxvq_u8 (vreinterpretq_u8_s8 (vshrq_n_s8 (current_bytes , 8 ))) == 0 ) {
4911
+ int8x16_t is_ascii = vreinterpretq_s8_u8 (vqsubq_u8 (vreinterpretq_u8_s8 (current_bytes ), vdupq_n_u8 (0x7F )));
4912
+ if (vmaxvq_u8 (is_ascii ) == 0 ) {
4912
4913
int8x16_t bad = vceqq_s8 (vandq_s8 (previous .rawbytes , bad_mask_prev_not_ascii ), bad_mask_prev_not_ascii );
4913
- if (vmaxvq_u8 (vreinterpretq_u8_s8 (bad ))) {
4914
+ if (vmaxvq_u8 (vreinterpretq_u8_s8 (bad )) != 0 ) {
4914
4915
return false;
4915
4916
}
4916
4917
}
You can’t perform that action at this time.
0 commit comments