This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
vectorization issue
- From: roy rosen <roy dot 1rosen at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 26 May 2010 17:27:10 +0300
- Subject: 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.