public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/22532] New: [4.1 Regression] We produce worse code on the mainline for a loop
@ 2005-07-17 20:50 pinskia at gcc dot gnu dot org
  2005-07-17 20:52 ` [Bug tree-optimization/22532] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-17 20:50 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-07-19 19:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-17 20:50 [Bug tree-optimization/22532] New: [4.1 Regression] We produce worse code on the mainline for a loop pinskia at gcc dot gnu dot org
2005-07-17 20:52 ` [Bug tree-optimization/22532] " pinskia at gcc dot gnu dot org
2005-07-17 20:52 ` pinskia at gcc dot gnu dot org
2005-07-17 21:37 ` dberlin at gcc dot gnu dot org
2005-07-17 22:02 ` pinskia at gcc dot gnu dot org
2005-07-18  5:52 ` pinskia at gcc dot gnu dot org
2005-07-18  6:49 ` pinskia at gcc dot gnu dot org
2005-07-18  7:47 ` steven at gcc dot gnu dot org
2005-07-19 19:58 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).