https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110061
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- bug 70814 comment #3 explains why this should not be done. As I mentioned it can be improved for armv8.4-a maybe using an ifunc but it cannot be done for before that.