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/4.1/4.2 Regression] missed load/store motion



------- Comment #25 from rguenth at gcc dot gnu dot org  2006-02-04 13:52 -------
On the mainline now even g() regresses, probably because of the reassoc pass
rewrite.  Of course on the mainline this is also "fixed" by --param
salias-max-array-elements=6, which makes load/store motion work on the tree
level.
It looks like expand only with

<L0>:;
  r[0] = r[0] + r[1];
  r[1] = r[1] + r[2];
  r[2] = r[2] + r[3];
  r[3] = r[3] + r[4];
  r[4] = r[4] + r[5];
  r[5] = r[5] + r[0];
  ivtmp.63 = ivtmp.63 + 1;
  if (ivtmp.63 != (unsigned int) n.68) goto <L0>; else goto <L2>;

produces RTL that we can optimize to

.L13:
        addl    %edi, %esi
        incl    %ebp
        addl    %ebx, %edi
        addl    %ecx, %ebx
        addl    %edx, %ecx
        addl    %eax, %edx
        addl    %esi, %eax
        cmpl    (%esp), %ebp
        jne     .L13

but not for (mainline)

<L0>:;
  D.1544 = r[1] + r[0];
  r[0] = D.1544;
  r[1] = r[2] + r[1];
  r[2] = r[3] + r[2];
  r[3] = r[4] + r[3];
  r[4] = r[5] + r[4];
  r[5] = D.1544 + r[5];
  n.61 = n.61 - 1;
  if (n.61 != 0) goto <L0>; else goto <L2>;


-- 


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]