[Bug tree-optimization/66980] New: [graphite] -floop-nest-optimize produces wrong code

spop at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 23 21:01:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66980

            Bug ID: 66980
           Summary: [graphite] -floop-nest-optimize produces wrong code
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: spop at gcc dot gnu.org
  Target Milestone: ---

$ cat s.c
void foo(unsigned char *in, unsigned char *out, int w, int h)
{
  unsigned int i, j;
  for (i = 0; i < 3*w*h; i++)
    for (j = 0; j < 3*w*h; j++)
      out[i * w + j] = in[(i * w + j)*3] + in[(i * w + j)*3 + 1] + in[(i * w +
j)*3 + 2];
}

$ gcc -O3 -floop-nest-optimize -S s.c -o -
[...]
foo:
        ret
[...]



More information about the Gcc-bugs mailing list