This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi, "Richard Guenther" <richard.guenther@gmail.com> wrote on 12/06/2008 12:06:20: > > > > + if (!useless_type_conversion_p (TREE_TYPE (op), TREE_TYPE > > (scalar_dest))), > > + { > > + if (vect_print_dump_info (REPORT_DETAILS)), > > + fprintf (vect_dump, "operands of different types"); > > + return false; > > + } > > This is always true. In a GIMPLE_MODIFY_STMT the rhs type is > trivially convertible to the lhs type. > > What you want to check is whether accesses through the vector pointer > correctly alias the scalar destination. Thus something along the line of > > /* If accesses through a pointer to vectype do not alias the original > memory reference we have a problem. */ > if (get_alias_set (vectype) != get_alias_set (scalar_dest) > && !alias_set_subset_of (get_alias_set (vectype), get_alias_set > (scalar_dest)) > { > if (vect_print_dump_info (REPORT_DETAILS)), > fprintf (vect_dump, "vector type does not alias scalar type"); > return false; > } > > which you in the end could fix by generating a ref-all pointer type in > vect_create_data_ref_ptr (using build_pointer_type_for_mode). > I committed the attached patch that contains this check. I also added the check to vectorizable_load(). Thanks, Ira > Otherwise the change looks ok. > > Richard. > (See attached file: pr36493.txt)
Attachment:
pr36493.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |