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 middle-end/47654] [4.6 Regression] gcc.dg/vect/no-section-anchors-vect-outer-4h.c FAILs with -floop-block


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

Sebastian Pop <spop at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #4 from Sebastian Pop <spop at gcc dot gnu.org> 2011-02-18 20:41:23 UTC ---
I don't think that the code generated by CLooG is wrong here:

Breakpoint 8, gloog (scop=0x19052f0, bb_pbb_mapping=0x1905570) at
../../gcc/graphite-clast-to-gimple.c:1524
(gdb) p debug_clast_stmt (pc.stmt)
for (scat_1=0;scat_1<=2;scat_1++) {
  for (scat_3=51*scat_1;scat_3<=min(127,51*scat_1+50);scat_3++) {
    for (scat_5=0;scat_5<=39;scat_5++) {
      S4(scat_5,scat_3);
    }
  }
}

This is not a loop blocking transform: it's just a strip mine of one of the
loops and an interchange of the outermost loop.  That is all legal.

First, we should have stopped the loop blocking when we knew that one of the
loops does not have enough iterations to be strip-mined.  I have a patch for
this one, but that's not the root cause of this bug...

On the overflow side, 51*scat_1+50 could be overflowing: when scat_1 is equal
to 2, the expression is equal to 152, and that overflows on char types.


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