2019-10-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/91982
* tree-vect-loop.c (vectorizable_live_operation): Also guard
against EXTRACT_LAST_REDUCTION.
* tree-vect-stmts.c (vect_transform_stmt): Likewise.
From-SVN: r276566
+2019-10-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/91982
+ * tree-vect-loop.c (vectorizable_live_operation): Also guard
+ against EXTRACT_LAST_REDUCTION.
+ * tree-vect-stmts.c (vect_transform_stmt): Likewise.
+
2019-10-04 Aldy Hernandez <aldyh@redhat.com>
(value_range_from_overflowed_bounds): Rename from
return true;
if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def)
{
- if (STMT_VINFO_REDUC_TYPE (stmt_info) == FOLD_LEFT_REDUCTION)
+ if (STMT_VINFO_REDUC_TYPE (stmt_info) == FOLD_LEFT_REDUCTION
+ || (STMT_VINFO_REDUC_TYPE (stmt_info) == COND_REDUCTION
+ && (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
+ == EXTRACT_LAST_REDUCTION)))
return true;
if (slp_node)
{
stmt_vec_info orig_stmt_info = vect_orig_stmt (stmt_info);
if (!slp_node && STMT_VINFO_REDUC_DEF (orig_stmt_info)
&& STMT_VINFO_REDUC_TYPE (orig_stmt_info) != FOLD_LEFT_REDUCTION
+ && (STMT_VINFO_REDUC_TYPE (orig_stmt_info) != COND_REDUCTION
+ || (STMT_VINFO_VEC_REDUCTION_TYPE (orig_stmt_info)
+ != EXTRACT_LAST_REDUCTION))
&& is_a <gphi *> (STMT_VINFO_REDUC_DEF (orig_stmt_info)->stmt))
{
gphi *phi = as_a <gphi *> (STMT_VINFO_REDUC_DEF (orig_stmt_info)->stmt);