This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/31360] New: [4.3 Regression] rtl loop invariant is broken
- 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: 26 Mar 2007 05:43:10 -0000
- Subject: [Bug rtl-optimization/31360] New: [4.3 Regression] rtl loop invariant is broken
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Testcase:
void f(int *a)
{
int i;
for (i = 0;i<100;i++)
a[i] = 0;
}
-----------cut-------------
we get:
_f:
li r0,0
li r2,4
stw r0,0(r3)
li r0,99
mtctr r0
L2:
li r0,0
stwx r0,r2,r3
addi r2,r2,4
bdnz L2
blr
the "li r0,0" should be moved out of the loop but is not.
--
Summary: [4.3 Regression] rtl loop invariant is broken
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31360