https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116065
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- then if that is the case then aarch64 started with r14-6290-g9f0f7d802482a8 (which added OPT_mearly_ra_ to aarch_option_optimization_table). What happens if you mark -munroll-only-small-loops as Optimization ? if that works, then aarch64 fix is to mark -mearly-ra= as Optimization too.