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/43657] [4.3/4.4/4.5/4.6 Regression] -ftree-loop-linear causes FAIL: gcc.dg/vect/vect-cond-5.c execution test


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

--- Comment #4 from Changpeng Fang <changpeng.fang at amd dot com> 2010-10-19 21:27:46 UTC ---
 for (k = 0; k < 32; k++)
    {
      res = 0;
      for (j = 0; j < 32; j++) 
        for (i = 0; i < 32; i++)
          { 
            next = a[i][j]; 
            res = c > cond_array[i+k][j] ? next : res;
          }

      out[k] = res;
    }


gcc interchanges i and j loops, which is not legal in this case.
Apparently, res takes the last value of a[i][j] that satisfies the 
condition c > cond_array[i+k][j]. As a result, change in the 
reference order will get a different value for res.

Anyone knows where to do this legality check?

What about the interchange in Graphite for this case?


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