public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/19905] New: Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop)
@ 2005-02-11 19:29 pinskia at gcc dot gnu dot org
  2005-02-11 19:38 ` [Bug tree-optimization/19905] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-11 19:29 UTC (permalink / raw)
  To: gcc-bugs

The following two functions should be the same (note don't compile with -ffast-math or even -fno-
math-errno as sqrt is marked as pure)

#define NUMPOINTS 20

float opoints[NUMPOINTS];

double sqrt (double);

void NormalizeVectors (void)
{
  int i, r;
  float s, x, y, z;
  static float d = 0.0;
  
  d += 0.2f;
  
  if (d > 4)
    d = 0.0;
  
  for (i=0; i<NUMPOINTS; i++)
  {
    opoints[i] = sqrt (d);
  }
}
void NormalizeVectors1 (void)
{
  int i, r;
  float s, x, y, z;
  static float d = 0.0;

  d += 0.2f;

  if (d > 4)
    d = 0.0;
  s = d;

  for (i=0; i<NUMPOINTS; i++)
  {
    opoints[i] = sqrt (s);
  }
}

-- 
           Summary: Extra V_MAY_DEF on a static variable whose address is
                    not taken (we should be able to move the load out of the
                    loop)
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          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=19905


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

* [Bug tree-optimization/19905] Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop)
  2005-02-11 19:29 [Bug tree-optimization/19905] New: Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop) pinskia at gcc dot gnu dot org
@ 2005-02-11 19:38 ` pinskia at gcc dot gnu dot org
  2005-02-20 19:30 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-11 19:38 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |18439
              nThis|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19905


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

* [Bug tree-optimization/19905] Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop)
  2005-02-11 19:29 [Bug tree-optimization/19905] New: Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop) pinskia at gcc dot gnu dot org
  2005-02-11 19:38 ` [Bug tree-optimization/19905] " pinskia at gcc dot gnu dot org
@ 2005-02-20 19:30 ` pinskia at gcc dot gnu dot org
  2005-05-08 17:40 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-20 19:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-20 14:12 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-20 14:12:07
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19905


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

* [Bug tree-optimization/19905] Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop)
  2005-02-11 19:29 [Bug tree-optimization/19905] New: Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop) pinskia at gcc dot gnu dot org
  2005-02-11 19:38 ` [Bug tree-optimization/19905] " pinskia at gcc dot gnu dot org
  2005-02-20 19:30 ` pinskia at gcc dot gnu dot org
@ 2005-05-08 17:40 ` pinskia at gcc dot gnu dot org
  2005-07-17 20:35 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-08 17:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-08 17:40 -------
oh, why is d considered call clobbered when it cannot be:
Variable: d.0, UID 0, float
Variable: d, UID 1, float, is global, call clobbered, default def: d_4


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2005-04-16 17:04:43         |2005-05-08 17:40:26
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19905


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

* [Bug tree-optimization/19905] Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop)
  2005-02-11 19:29 [Bug tree-optimization/19905] New: Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop) pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-05-08 17:40 ` pinskia at gcc dot gnu dot org
@ 2005-07-17 20:35 ` pinskia at gcc dot gnu dot org
  2005-07-17 20:55 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-17 20:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-17 20:34 -------
This is not fixed Kenny's promote statics, in fact we now produce worse code at -O3.  Note on ppc-
darwin the code is fine since -fno-math-errno is done by default.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19905


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

* [Bug tree-optimization/19905] Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop)
  2005-02-11 19:29 [Bug tree-optimization/19905] New: Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop) pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-07-17 20:35 ` pinskia at gcc dot gnu dot org
@ 2005-07-17 20:55 ` pinskia at gcc dot gnu dot org
  2005-07-19 20:00 ` pinskia at gcc dot gnu dot org
  2005-08-23 16:52 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-17 20:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-17 20:52 -------
(In reply to comment #3)
> This is not fixed Kenny's promote statics, in fact we now produce worse code at -O3.  Note on ppc-
> darwin the code is fine since -fno-math-errno is done by default.
I filed that as PR 22532.



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |22532


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19905


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

* [Bug tree-optimization/19905] Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop)
  2005-02-11 19:29 [Bug tree-optimization/19905] New: Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop) pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-07-17 20:55 ` pinskia at gcc dot gnu dot org
@ 2005-07-19 20:00 ` pinskia at gcc dot gnu dot org
  2005-08-23 16:52 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-19 20:00 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 19905 depends on bug 22532, which changed state.

Bug 22532 Summary: [4.1 Regression] We produce worse code on the mainline for a loop
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22532

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19905


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

* [Bug tree-optimization/19905] Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop)
  2005-02-11 19:29 [Bug tree-optimization/19905] New: Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop) pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-07-19 20:00 ` pinskia at gcc dot gnu dot org
@ 2005-08-23 16:52 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-23 16:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-23 16:40 -------
I think the FIXME in tree-ssa-operands.c is the answer here:
  /* FIXME - if we have better information from the static vars
     analysis, we need to make the cache call site specific.  This way
     we can have the performance benefits even if we are doing good
     optimization.  */

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19905


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

* [Bug tree-optimization/19905] Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop)
       [not found] <bug-19905-4@http.gcc.gnu.org/bugzilla/>
@ 2014-03-13 10:52 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-13 10:52 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19905

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Long fixed.


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

end of thread, other threads:[~2014-03-13 10:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-11 19:29 [Bug tree-optimization/19905] New: Extra V_MAY_DEF on a static variable whose address is not taken (we should be able to move the load out of the loop) pinskia at gcc dot gnu dot org
2005-02-11 19:38 ` [Bug tree-optimization/19905] " pinskia at gcc dot gnu dot org
2005-02-20 19:30 ` pinskia at gcc dot gnu dot org
2005-05-08 17:40 ` pinskia at gcc dot gnu dot org
2005-07-17 20:35 ` pinskia at gcc dot gnu dot org
2005-07-17 20:55 ` pinskia at gcc dot gnu dot org
2005-07-19 20:00 ` pinskia at gcc dot gnu dot org
2005-08-23 16:52 ` pinskia at gcc dot gnu dot org
     [not found] <bug-19905-4@http.gcc.gnu.org/bugzilla/>
2014-03-13 10:52 ` rguenth at gcc dot gnu.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).