https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113019
--- Comment #5 from Artem S. Tashkinov <aros at gmx dot com> --- (In reply to ktkachov from comment #1) > GCC provides the Function Multiversioning feature that's supported on some > architectures: > https://gcc.gnu.org/onlinedocs/gcc/Function-Multiversioning.html > > That seems to do what you want? This can only be achieved manually by rewriting everything, while I was thinking about something compiler-side which you can enabled as a compile option.