This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

vectorization issue


Hi,

I have tried vectorization and encountered a problem which I can see
is common to some ports (I tried ia64 and bfin).

For this function:

#define ts unsigned short
void f(ts* __restrict__ a, ts* __restrict__ b, ts* __restrict__ x)
{
    int i;
    for (i=0;i<1024;i++)
        x[i] = a[i] + b[i];
}

the loop is vectorized.
But if I define ts as follows: #define ts short
then the loop is not vectorized. The message I get is:

./a.c:21: note: no optab.
./a.c:21: note: not vectorized: relevant stmt not supported: D.1279_12
= (short unsigned int) D.1278_11;

I have tried to look a bit in the vectorizer code and it seems that
for this stmt I get to vectorizable_operation with code==NOP_EXPR
which is not handled.

Does anyone knows anything about this problem?

Thanks, Roy.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]