https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61247

--- Comment #4 from Steve Ellcey <sje at gcc dot gnu.org> ---
Here is a simpler C version of the problem.

On aarch64 in LP64 mode setting TYPE
to int, long int, or unsigned long int allows for vectorization
but using unsigned int does not get vectorized.

In ILP32 mode, all types allow the loop to be vectorized.


/* int gets vectorized
   long int gets vectorized
   unsigned long int gets vectorized
   unsigned int does NOT get vectorized in LP64 mode */

typedef unsigned int TYPE;
void f(TYPE N, int *C, int *A, int val)
{
        TYPE i,j;
        for (i=0; i<N; i++) {
                for (j=0; j<N; j++) {
                        C[i*N+j]=A[i*N+j] * val;
                }
        }
}

Reply via email to