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:42:06 -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:42 -------
Though I should note that PPC is much better on the mainline than before:
gcc 4.0.0:
L4:
lfsx f0,r3,r2
stfsx f0,r5,r2
lfsx f13,r4,r2
stfsx f13,r6,r2
addi r2,r2,4
bdnz L4
gcc 3.3 (Apple's):
L9:
slwi r7,r11,2
addi r11,r11,1
lfsx f0,r7,r3
stfsx f0,r7,r5
lfsx f1,r7,r4
stfsx f1,r7,r6
bdnz L9
So really this is a target specific bug :).
Also here the loop for x86_64:
.L4:
movl (%rdx,%r10), %eax
incl %ecx
movl %eax, (%rdx,%r9)
movl (%rdx,%rdi), %eax
movl %eax, (%rdx,%rsi)
addq $4, %rdx
cmpl %ecx, %r8d
jg .L4
Note changing the type of n and i to be unsigned we get slightly better code:
.L4:
movl -16(%ebp), %ebx
leal 0(,%ecx,4), %eax
incl %ecx
cmpl %ecx, 24(%ebp)
movl (%ebx,%eax), %edx
movl -20(%ebp), %ebx
movl %edx, (%edi,%eax)
movl (%esi,%eax), %edx
movl %edx, (%ebx,%eax)
jne .L4
So IV-OPTs is not doing its job correctly in one place.
--
What |Removed |Added
----------------------------------------------------------------------------
GCC target triplet| |i?86-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18463