Details in this thread:
http://gcc.gnu.org/ml/gcc/2006-09/msg00167.html

"
   A silly little testcase which the vectorizer doesn't vectorize:

unsigned char qa[128];
unsigned char qb[128];
unsigned char qc[128];
unsigned char qd[128];

void autovectqi (void)
{
        int i;

        for (i = 0; i < 128; i ++)
                qd[i] = qa[i] ^ qb[i] + qc[i];
}

...

   If I change 'qb[i] + qc[i]' to e.g. 'qb[i] & qc[i]' the vectorizer works
fine.
....
autovecttest.c:11: note: not vectorized: relevant stmt not supported: D.1861_9
= (signed char) D.1860_8
"

Devnag suggested the solution should be part of a "tree-combin" pass:
http://gcc.gnu.org/ml/gcc/2006-09/msg00182.html

Dorit suggested to add it as part of the vectorizer's pattern-recognition
engine:
http://gcc.gnu.org/ml/gcc/2006-09/msg00281.html


-- 
           Summary: missed optimization: redundant casts prevent
                    vectorization
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dorit at il dot ibm dot com


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

Reply via email to