This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/22532] New: [4.1 Regression] We produce worse code on the mainline for a 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: 17 Jul 2005 20:50:07 -0000
- Subject: [Bug tree-optimization/22532] New: [4.1 Regression] We produce worse code on the mainline for a loop
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Take the following code:
#define NUMPOINTS 20
static float opoints[NUMPOINTS];
double sqrt (double);
double f(double);
void NormalizeVectors1 (void)
{
int i, r;
float s, x, y, z;
static float d = 0.0;
d += 0.2f;
s = d;
for (i=0; i<NUMPOINTS; i++)
opoints[i] = f(s);
}
Compile at -O2 and -O3 and compare. See how we load/store now at -O3 to the static variable, d
inside the loop.
--
Summary: [4.1 Regression] We produce worse code on the mainline
for a loop
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
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=22532