loop = LOOP_VINFO_LOOP (loop_info);
+ /* We don't allow changing the order of the computation in the inner-loop
+ when doing outer-loop vectorization. */
+ if (loop && nested_in_vect_loop_p (loop, last_stmt))
+ return NULL;
+
if (!is_gimple_assign (last_stmt))
return NULL;
{
gimple def_stmt;
- if (STMT_VINFO_DEF_TYPE (stmt_vinfo) != vect_reduction_def)
- return NULL;
oprnd0 = gimple_assign_rhs1 (last_stmt);
oprnd1 = gimple_assign_rhs2 (last_stmt);
if (!types_compatible_p (TREE_TYPE (oprnd0), type)
dump_printf (MSG_NOTE, "\n");
}
- /* We don't allow changing the order of the computation in the inner-loop
- when doing outer-loop vectorization. */
- gcc_assert (!nested_in_vect_loop_p (loop, last_stmt));
-
return pattern_stmt;
}
loop = LOOP_VINFO_LOOP (loop_info);
+ /* We don't allow changing the order of the computation in the inner-loop
+ when doing outer-loop vectorization. */
+ if (loop && nested_in_vect_loop_p (loop, last_stmt))
+ return NULL;
+
if (!is_gimple_assign (last_stmt))
return NULL;
{
gimple def_stmt;
- if (STMT_VINFO_DEF_TYPE (stmt_vinfo) != vect_reduction_def)
- return NULL;
plus_oprnd0 = gimple_assign_rhs1 (last_stmt);
plus_oprnd1 = gimple_assign_rhs2 (last_stmt);
if (!types_compatible_p (TREE_TYPE (plus_oprnd0), sum_type)
dump_printf (MSG_NOTE, "\n");
}
- /* We don't allow changing the order of the computation in the inner-loop
- when doing outer-loop vectorization. */
- gcc_assert (!nested_in_vect_loop_p (loop, last_stmt));
-
return pattern_stmt;
}
loop = LOOP_VINFO_LOOP (loop_info);
+ /* We don't allow changing the order of the computation in the inner-loop
+ when doing outer-loop vectorization. */
+ if (loop && nested_in_vect_loop_p (loop, last_stmt))
+ return NULL;
+
if (!is_gimple_assign (last_stmt))
return NULL;
if (gimple_assign_rhs_code (last_stmt) != PLUS_EXPR)
return NULL;
- if (STMT_VINFO_DEF_TYPE (stmt_vinfo) != vect_reduction_def)
- return NULL;
-
oprnd0 = gimple_assign_rhs1 (last_stmt);
oprnd1 = gimple_assign_rhs2 (last_stmt);
if (!types_compatible_p (TREE_TYPE (oprnd0), type)
dump_printf (MSG_NOTE, "\n");
}
- /* We don't allow changing the order of the computation in the inner-loop
- when doing outer-loop vectorization. */
- gcc_assert (!nested_in_vect_loop_p (loop, last_stmt));
-
return pattern_stmt;
}