+2019-10-22 Richard Sandiford <richard.sandiford@arm.com>
+
+ * tree-vect-slp.c (vect_slp_bb_region): Check whether
+ autodetected_vector_size rather than vector_size is zero.
+ * tree-vect-loop.c (vect_analyze_loop): Likewise.
+ Set autodetected_vector_size immediately after calling
+ vect_analyze_loop_2. Check for a fatal error before advancing
+ next_size.
+
2019-10-21 Jason Merrill <jason@redhat.com>
* lock-and-run.sh: Check for process existence rather than timeout.
LOOP_VINFO_ORIG_LOOP_INFO (loop_vinfo) = orig_loop_vinfo;
opt_result res = vect_analyze_loop_2 (loop_vinfo, fatal, &n_stmts);
+ if (next_size == 0)
+ autodetected_vector_size = loop_vinfo->vector_size;
+
if (res)
{
LOOP_VINFO_VECTORIZABLE_P (loop_vinfo) = 1;
else
delete loop_vinfo;
- if (next_size == 0)
- autodetected_vector_size = loop_vinfo->vector_size;
-
- if (next_size < vector_sizes.length ()
- && known_eq (vector_sizes[next_size], autodetected_vector_size))
- next_size += 1;
-
if (fatal)
{
gcc_checking_assert (first_loop_vinfo == NULL);
return opt_loop_vec_info::propagate_failure (res);
}
+ if (next_size < vector_sizes.length ()
+ && known_eq (vector_sizes[next_size], autodetected_vector_size))
+ next_size += 1;
+
if (next_size == vector_sizes.length ()
- || known_eq (loop_vinfo->vector_size, 0U))
+ || known_eq (autodetected_vector_size, 0U))
{
if (first_loop_vinfo)
{
if (vectorized
|| next_size == vector_sizes.length ()
- || known_eq (bb_vinfo->vector_size, 0U)
+ || known_eq (autodetected_vector_size, 0U)
/* If vect_slp_analyze_bb_1 signaled that analysis for all
vector sizes will fail do not bother iterating. */
|| fatal)