[Bug c/58626] [4.9 Regression] possible array wrong code bug

2013-10-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58626

--- Comment #3 from Richard Biener  ---
I have updated my do-proper-partition-dependencies patch and verified it fixes
this issue.  We now generate

  :
  __builtin_memmove (&MEM[(void *)&a + 24B], &MEM[(void *)&a + 48B], 8);

  :
  # b.0_10 = PHI 
  a[1][3] = 0;
  _25 = a[3][b.0_10];
  a[2][b.0_10] = _25;
  b.1_12 = b.0_10 + 1;
  if (b.1_12 <= 1)
goto ;
  else
goto ;

  :
  goto ;

  :
  b = 2;
  _14 = a[1][1];
  if (_14 != 1)

note the inner loop is completely peeled before loop distribution and we see

  :
  # b.0_10 = PHI 
  a[1][3] = 0;
  _19 = a[2][b.0_10];
  a[1][b.0_10] = _19;
  _25 = a[3][b.0_10];
  a[2][b.0_10] = _25;
  b.1_12 = b.0_10 + 1;
  if (b.1_12 <= 1)

the patch still needs quite some TLC though.


[Bug c/58626] [4.9 Regression] possible array wrong code bug

2013-10-10 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58626

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
Summary|possible array wrong code   |[4.9 Regression] possible
   |bug |array wrong code bug

--- Comment #2 from Richard Biener  ---
Mine.