https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92637
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > 214: aa0a03e0 mov x0, x10 // HERE x10 is overwriten > by glibc Hmm, GCC knows that find_next_zero_bit will not clobber x10 so it uses across the call of that. This is due to -fipa-ra . glibc should not be involved in the call to find_next_zero_bit either. If the ld.so is clobbering registers, then the bug is there I think. Also I doubt -ftree-coalesce-vars is the issue but rather exposing the issue with -fipa-ra. Does using -fno-ipa-ra fix the issue?