public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/19347] New: Invariant load not moved out of loop
@ 2005-01-09 10:51 irar at il dot ibm dot com
  2005-01-09 15:55 ` [Bug tree-optimization/19347] " pinskia at gcc dot gnu dot org
  2005-04-11  6:10 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: irar at il dot ibm dot com @ 2005-01-09 10:51 UTC (permalink / raw)
  To: gcc-bugs

In mesa benchmark (osmesa.c:678) 

         GLuint i, n, *ptr4;
         n = osmesa->rowlength * osmesa->height;
         ptr4 = (GLuint *) osmesa->buffer;
         for (i=0;i<n;i++) {
            *ptr4++ = osmesa->clearpixel;
         }   

The load of osmesa->clearpixel is not taken outside the loop by LIM because of 
aliasing limitations. This in turn also prevents vectorization.

In this particular case we can actually get the load moved out of the loop even 
without resolving the aliasing issue (which requires whole-program), on 
account that even if the store aliases the load, it will not alter the value 
loaded (because we store the same value that we loaded).

I'm looking into this in the context of the vectorizer.

-- 
           Summary: Invariant load not moved out of loop
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: irar at il dot ibm dot com
        ReportedBy: irar at il dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.0.0
  GCC host triplet: powerpc-apple-darwin7.0.0
GCC target triplet: powerpc-apple-darwin7.0.0


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


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

* [Bug tree-optimization/19347] Invariant load not moved out of loop
  2005-01-09 10:51 [Bug tree-optimization/19347] New: Invariant load not moved out of loop irar at il dot ibm dot com
@ 2005-01-09 15:55 ` pinskia at gcc dot gnu dot org
  2005-04-11  6:10 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-09 15:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-01-09 15:55 -------
Confirmed but add a full testcase here, thanks.

Actually I don't think it would require whole program analysis to do this in LIM (or LICM), we just need 
more information (which might be done on the structure-aliasing branch).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-09 15:55:15
               date|                            |


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


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

* [Bug tree-optimization/19347] Invariant load not moved out of loop
  2005-01-09 10:51 [Bug tree-optimization/19347] New: Invariant load not moved out of loop irar at il dot ibm dot com
  2005-01-09 15:55 ` [Bug tree-optimization/19347] " pinskia at gcc dot gnu dot org
@ 2005-04-11  6:10 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-11  6:10 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
   Last reconfirmed|2005-01-09 15:55:15         |2005-04-11 06:09:59
               date|                            |


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


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

end of thread, other threads:[~2005-04-11  6:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-09 10:51 [Bug tree-optimization/19347] New: Invariant load not moved out of loop irar at il dot ibm dot com
2005-01-09 15:55 ` [Bug tree-optimization/19347] " pinskia at gcc dot gnu dot org
2005-04-11  6:10 ` 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).