------- Comment #6 from irar at il dot ibm dot com 2010-03-28 18:05 -------
(In reply to comment #4)
> What about fixing the diagnostic message like this:
>
It would be nice to do the same for SLP (compute_data_dependences_for_bb) for
completeness.
Thanks,
Ira
> diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
> index 37ae9b5..44248b3 100644
> --- a/gcc/tree-vect-data-refs.c
> +++ b/gcc/tree-vect-data-refs.c
> @@ -1866,10 +1866,21 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo,
> bb_vec_info bb_vinfo)
>
> if (loop_vinfo)
> {
> + bool res;
> +
> loop = LOOP_VINFO_LOOP (loop_vinfo);
> - compute_data_dependences_for_loop (loop, true,
> - &LOOP_VINFO_DATAREFS (loop_vinfo),
> - &LOOP_VINFO_DDRS (loop_vinfo));
> + res = compute_data_dependences_for_loop
> + (loop, true, &LOOP_VINFO_DATAREFS (loop_vinfo),
> + &LOOP_VINFO_DDRS (loop_vinfo));
> +
> + if (!res)
> + {
> + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS))
> + fprintf (vect_dump, "not vectorized: loop contains function calls"
> + " or data references that cannot be analyzed");
> + return false;
> + }
> +
> datarefs = LOOP_VINFO_DATAREFS (loop_vinfo);
> }
> else
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43436