This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/22325] New: missed optimization in loop
- 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: 6 Jul 2005 15:18:23 -0000
- Subject: [Bug tree-optimization/22325] New: missed optimization in loop
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following two functions should be the same:
int foo(int a) {
int i;
for (i=0; i<200; i++) {
a = a + 5;
}
return a;
}
int foo(int a) {
int i;
for (i=0; i<200; i++) ;
return a+5*200;
}
The RTL optimizers catch this on ppc but not on x86.
--
Summary: missed optimization in loop
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization, TREE
Severity: enhancement
Priority: P2
Component: tree-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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22325