https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115825
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- For avr, we get: size: 5-4, last_iteration: 5-4 Loop size: 5 Estimated size after unrolling: 5 So something is under-estimating the size after unrolling.