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

--- Comment #14 from rguenther at suse dot de <rguenther at suse dot de> 
2012-08-23 08:10:15 UTC ---
On Thu, 23 Aug 2012, stevenb.gcc at gmail dot com wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53695
> 
> --- Comment #12 from stevenb.gcc at gmail dot com <stevenb.gcc at gmail dot 
> com> 2012-08-23 07:56:13 UTC ---
> > The patch is of couse a "big hammer" because it has a cost, but IMHO
> > it still makes sense.
> 
> I'm not convinced. GCC has always detected this kind of loop (even the
> old non-cfg loop code recognizes this kind of loop) and it has never
> caused any problems before your patch to keep the loop structure
> up-to-date. To me, this means that the fix should be in the loop
> updating, not in abandoning a decades-old behavior of the compiler.

It's inconsistent in that it considers

  <header>
  |   ^
 (ab) |
  v   |
  latch

a loop but not

  <header>
  |   ^
  |  (ab)
  v   |
  latch

and tracer "rotates" this loop by swapping dominance relationship
between header and latch but not makes the non-loop magically a loop.

My patch makes both not a loop.

Reply via email to