https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35341

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Currently we get at -O2:

Estimating sizes for loop 1
 BB: 3, after_exit: 0
  size:   1 _1 = i_13 * 2;
   Induction variable computation will be folded away.
  size:   1 _2 = a[_1];
  size:   1 _3 = a[i_13];
  size:   1 _4 = _2 + _3;
  size:   1 a[_1] = _4;
  size:   2 if (_4 == 10)
 BB: 6, after_exit: 1
 BB: 4, after_exit: 0
  size:   1 i_10 = i_13 + 1;
   Induction variable computation will be folded away.
  size:   1 ivtmp_7 = ivtmp_12 - 1;
   Induction variable computation will be folded away.
  size:   2 if (ivtmp_7 != 0)
   Exit condition will be eliminated in peeled copies.
   Exit condition will be eliminated in last copy.
   Constant conditional.
size: 11-5, last_iteration: 11-5
  Loop size: 11
  Estimated size after unrolling: 20
Not unrolling loop 1: size would grow.

We do unroll at -O3.

Reply via email to