------- Additional Comments From belyshev at depni dot sinp dot msu dot ru  
2005-01-23 00:42 -------
(In reply to comment #4)
> This can be fixed at the tree level without any gcse or ra hacking: 
> http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01462.html 

GCC generates poor code for this function even with that patch applied:

int r[6];

void g (int n)
{
  while (-- n)
    {
      r [0] += r [5];
      r [1] += r [0];
      r [2] += r [1];
      r [3] += r [2];
      r [4] += r [3];
      r [5] += r [4];
    }
}


-- 


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

Reply via email to