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

Reply via email to