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/29738] Missed constant propagation into loops



------- Comment #6 from rguenth at gcc dot gnu dot org  2006-11-06 12:18 -------
But obviously for real operands, foo () won't clobber them.  I.e. the following
also could be optimized but is not:

void foo (int *);
void bar (void)
{
  int j;
  int i;
  i = 0;
  for (j = 0; j < 10000; j++)
    if (i)
      foo (&i);
}

foo () will be never executed, so the clobbering of i is not "executed",
so we don't need i as PHI arg/result for the loop.  This is what I'm looking
for as optimization.


-- 


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


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