A given arch feature might enabled by a pragma or a function attribute so in this cases would be nice to use intrinsics.
Today GCC offers the intrinsics without the march flag[1].
PR[2] for ACLE to clarify the intention and remove the need for -march flag for a given intrinsics.
This is going to be more useful when D127812 lands.
[1] https://godbolt.org/z/bxcMhav3z
[2] https://github.com/ARM-software/acle/pull/214
I had a (completely untested) version of this function doing the same thing. I was basing it on string processing, though, so we didn't have to add new code for each new version of the architecture. I'm not sure if it was a good idea or not.