------- Comment #7 from irar at il dot ibm dot com 2008-09-15 09:11 ------- (In reply to comment #6)
> > I see vect_create_data_ref_ptr is getting the type to use passed > in case of stores and this is TREE_TYPE (vec_oprnd) - is vec_oprnd > the lhs or the rhs? It looks like it is the rhs which may explain > the ICE for PR37385, It's the other way around in PR37385 - it ICEs if we use the type of lhs. > I can try to have a look here, but I'm not exactly familiar with > the code (thanks for the pointers ;)), so I'd appreciate if you > try to figure out what it takes to fix vect_create_data_ref_ptr or > its caller. Sure, I never meant to ask you to look into the vectorizer code. I only gave you the pointers because I thought you asked. Fixing the vectorizer code is not a problem. The problem is I don't really understand what we should generate. For scalar store *x = y we create vector store *vect_x = vect_y. The type of vect_x must be "vector type_of_x", right? This will cause the ICE in pr 37385, so we must check something to prevent it. AFAIU, the ICE is because the lhs and the element type of rhs do not alias. Testing "vector type_of_x" and "type_of_y" for alias does the job. But this prevents vectorization of vectorize2.c (vector int and long int do not alias)... Thanks a lot for your help, Ira -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37491