This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/19210] New: [4.0 Regression] not using do-loop for some loops
- 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: 30 Dec 2004 20:44:42 -0000
- Subject: [Bug rtl-optimization/19210] New: [4.0 Regression] not using do-loop for some loops
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Take following loop:
int a[220000];
void
f (int n)
{
int k;
for(k = 3;k <= n;k++) {
a[k] = k;
}
}
On the mainline we produce:
L4:
stw r9,0(r2)
addi r9,r9,1
cmpw cr7,r3,r9
addi r2,r2,4
bge+ cr7,L4
But with 3.3.2, we use bdnz:
L9:
slwi r3,r11,2
stwx r11,r3,r9
addi r11,r11,1
bdnz L9
--
Summary: [4.0 Regression] not using do-loop for some loops
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: minor
Priority: P2
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19210