https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115825
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- It's odd that you see Loop 1 iterates 7 times. Loop 1 iterates at most 7 times. Loop 1 likely iterates at most 7 times. Estimating sizes for loop 1 BB: 3, after_exit: 0 size: 1 v ={v} i_10; size: 0 i.0_1 = (unsigned char) i_10; Induction variable computation will be folded away. size: 1 _2 = i.0_1 + 254; Induction variable computation will be folded away. size: 0 i_7 = (char) _2; Induction variable computation will be folded away. size: 1 ivtmp_3 = ivtmp_4 - 1; Induction variable computation will be folded away. size: 2 if (ivtmp_3 != 0) Exit condition will be eliminated in peeled copies. Exit condition will be eliminated in last copy. Constant conditional. BB: 5, after_exit: 1 size: 5-4, last_iteration: 5-4 Loop size: 5 Estimated size after unrolling: 5 while I correctly see an estimated size after unrolling of 8 ... note this still then runs into the 2/3 reduction. Ah, the dumping is because trunk no longer does that 2/3 scaling in estimated_unrolled_size. So I'm still of the opinion that we should restrict the 2/3 scaling to a specific set of stmts (or do the reverse and exclude another set, like in this case volatile accesses).