[PATCH v2 1/4] riscv: Add multiarch scaffolding for str*/mem* routines
Jeff Law
jeffreyalaw@gmail.com
Fri Oct 17 15:14:43 GMT 2025
On 10/13/25 9:27 AM, Yao Zihong wrote:
>> For the RVV implementation, please split the symbols with one per patch. Also
>> for __memcmpeq I would just alias to memcmp, the optimization is only a couple
>> of instructions on the found patch; but it is up to you if you really think it
>> is worth it (and for memcmp, can’t you synthesize the results from the vector
>> register instead of reading the input?).
>
>> The same applies to the string RVV routines [7]. It puzzles me why you are
>> pushing for arch-optimized strcat/strncat when strcpy/strlen/strnlen/memcpy
>> are optimized. Again, it is up to the RISC-V maintainer to see if this is valuable.
>
> Understood - the current RVV work was mainly to intended to continue existing
> community efforts.
>
> For memcmp/__memcmpeq I can fold or alias as suggested, and if the maintainers feel
> the str{n}cat side isn’t worth the extra complexity, I would drop or alias those as well.
I recommend we get the basics in, then do some performance comparisons
for the more esoteric routines like memcmpeq or uarch specific routines
and let the data guide us.
Jeff
More information about the Libc-alpha
mailing list