I am trying simple matrix addition code to get auto vectorized.
int n = 6;
for (int i=0; i<n; i++)
for (int j=0; j<n; j++)
C[i*n+j] = A[i*n+j] + B[i*n+j];
I am getting following remarks after using Rpass analysis flag for the above code :
the cost-model indicates that vectorization is not beneficial [-Rpass-missed=loop-vectorize]
the cost-model indicates that interleaving is not beneficial [-Rpass-missed=loop-vectorize]
loop not vectorized: the optimizer was unable to perform the requested transformation; the
transformation might be disabled or specified as part of an unsupported transformation ordering
what changes should I do to make it vectorized and what does this remarks mean ?