This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/27755] PRE confused by control flow



------- Comment #1 from rguenth at gcc dot gnu dot org  2006-05-24 13:36 -------
Not only loads:

int foo(int k, int b)
{
  int j=0;
  int res;
  do {
    for (int n=0;n<3;++n);
    res = b+1;
  } while (++j<k);
  return res;
}

b+1 is not moved out of the outer loop.  This looks like it would affect
loop invariant motion in general for nested loops in case the invariants
are computed after the inner loops.  Is this how it is supposed to be?


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|load-PRE confused by control|PRE confused by control flow
                   |flow                        |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]