This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18463] [4.0 Regression] Moving floating point through an integer register
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Nov 2004 17:54:24 -0000
- Subject: [Bug tree-optimization/18463] [4.0 Regression] Moving floating point through an integer register
- References: <20041113170938.18463.steven@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-13 17:54 -------
For PPC at least IV-OPTS should note that we have post increment and decrement the pointers before
the loop and then increment all of them inside the loop, aka:
void
fcpy(float *restrict a, float *restrict b,
float *restrict aa, float *restrict bb, unsigned n)
{
unsigned i;
aa-=1; a-=1; bb-=1; b-=1;
for(i = 0; i < n; i++) {
aa+=1; a+=1; bb+=1; b+=1;
*bb=*b;
*aa=*a;
}
}
So we get:
L4:
lfsu f0,4(r4)
lfsu f13,4(r3)
stfsu f0,4(r6)
stfsu f13,4(r5)
bdnz L4
which is the most optimal for PPC
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18463