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/37810] Bad store sinking job



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-10-12 15:25 -------
The original testcase (from an IRC discussion) reduced to a C testcase is:

struct A {
  int n;
  int m;
};

void g();

void test (struct A* iter)
{
  struct A end = { 0, 0 };
  while (iter->n != end.n)
    {
      iter->n = iter->n + 1;
      if (iter->n == iter->m)
        g();
    }
}

where there is an optimization possibility to sink the store to iter->n to
before the call and apply load-store motion to iter->n for the remaining loop.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |alias


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


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