[PATCH] AArch64: Improve generic strlen
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Wed Aug 7 14:22:39 GMT 2024
Hi Adhemerval,
> I had the impression that using umaxp will saturate more vector ports, but it seems that it is not the case for strlen.
UMINP works out well when you need to combine 2 or 4 vectors like in __strlen_asimd.
However for compressing 128-bit masks to 64 bits, ADDHN is better since it preserves
each element like SHRN and so can be used by RBIT+CLZ, while UMINP/UMAXP merges
pairs of elements (and thus requires extra FMOV and SHRN or ADDHN after the loop).
Cheers,
Wilco
More information about the Libc-alpha
mailing list