https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118175
--- Comment #4 from Huaqi <fanghuaqi at vip dot qq.com> --- (In reply to Andrew Pinski from comment #3) > (In reply to Huaqi from comment #2) > > (In reply to Andrew Pinski from comment #1) > > > Looks like an alias issue. > > > Changing the matrix definitions to: > > > extern float matA[], matB[], matC[]; > > > > > > > > > Allows GCC to vectorize the loop even for x86_64. > > > > Yes, it works. But when I changed the function name to void * > > CalculaProdutoMatriz(float *matA, float *matB, float *matC, void *arg), then > > it still not work, I expected it may work, since I think it just similiar to > > what you suggested. > > If you add restrict the arguments, GCC will also vectorizer. Again this is > an aliasing issue. Sorry, I am not an expert in the gcc area. Could you please kindly point out some documentation explaining the gcc aliasing to me? Thank you.