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 rtl-optimization/19580] [3.4/4.0 Regression] missed load/store motion


------- Additional Comments From belyshev at depni dot sinp dot msu dot ru  2005-01-23 19:51 -------
(In reply to comment #18)
> I'm not sure what you think the missed optimization is here.  You will have 
> to show what you want at the assembly level, and explain why you think this 
> is a coalescing problem.  So far, I don't see a missed optimization. 

Short examples in comment #9 I used only to show that there is problem with
variable coalescing at tree level, of course they all optimized at rtl level.

To see *the* problem, compare i386 assembly and .optimized dumps for these two
functions on mainline with patch to bug 19464 applied:

int r[6];

void f (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];
    }
}

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


-- 


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


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