http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59967
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Priority|P3 |P2 Status|UNCONFIRMED |NEW Last reconfirmed| |2014-03-31 CC| |hubicka at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Caused by r193246: 193246 hubicka /* If there is call on a hot path through the loop, then 193246 hubicka there is most probably not much to optimize. */ 193246 hubicka else if (size.num_non_pure_calls_on_hot_path) 138522 rguenth { 138522 rguenth if (dump_file && (dump_flags & TDF_DETAILS)) 193246 hubicka fprintf (dump_file, "Not unrolling loop %d: " 193246 hubicka "contains call and code would grow.\n", 138522 rguenth loop->num); 138522 rguenth return false; 138522 rguenth } so we conclude size: 59-8, last_iteration: 52-5 Loop size: 59 Estimated size after unrolling: 269 Not unrolling loop 2: contains call and code would grow. so it was disabled on purpose. Not sure if it's worth special-casing self-recursive calls the same as pure/const ones.