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] New: load-PRE confused by control flow


In the following testcase load-PRE is not able to hoist the load of *x
out of the loop because of the empty loop.

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


-- 
           Summary: load-PRE confused by control flow
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org
OtherBugsDependingO 22501
             nThis:


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]