[Bug regression/40886] [4.3/4.4/4.5 Regression] No loop counter reversal for simple loops anymore

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jul 28 11:09:00 GMT 2009



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-07-28 11:09 -------
The tree optimizers canonicalize the loop to

<bb 3>:
  # i_5 = PHI <i_3(4), 0(2)>
  # ivtmp.23_1 = PHI <ivtmp.23_4(4), 10(2)>
  f2 ();
  i_3 = i_5 + 1;
  ivtmp.23_4 = ivtmp.23_1 - 1;
  if (ivtmp.23_4 != 0)
    goto <bb 4>;
  else
    goto <bb 5>;

<bb 4>:
  goto <bb 3>;

But then IVOPTs chooses i as the induction variable again.

Maybe a DCE pass before IVOPTs magically would solve the regression - or
simply do not consider candidates without uses?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakdver at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization
      Known to fail|                            |4.0.0
      Known to work|                            |3.4.6
   Last reconfirmed|0000-00-00 00:00:00         |2009-07-28 11:09:27
               date|                            |
            Summary|No loop counter reversal for|[4.3/4.4/4.5 Regression] No
                   |simple loops anymore        |loop counter reversal for
                   |                            |simple loops anymore
   Target Milestone|---                         |4.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40886



More information about the Gcc-bugs mailing list