https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115825
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |7.1.0 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-07-08 Ever confirmed|0 |1 Target Milestone|--- |11.5 Target|avr |avr aarch64 x86_64 Summary|Loop unrolling increases |[11/12/13/14 Regression] |code size with -Os |Loop unrolling increases | |code size with -Os Known to work| |6.3.0 CC| |pinskia at gcc dot gnu.org --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #1) > 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. Maybe volatile stores should be increased with its size. Note you get the same increase in size on aarch64 and x86_64 too. started to happen between GCC 6 and GCC 7 even. Confirmed.