From: Richard Biener Date: Fri, 4 Oct 2019 09:18:26 +0000 (+0000) Subject: re PR target/91982 (gcc.target/aarch64/sve/clastb_*.c tests failing with segfault) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=48528394eafa9d1db9f956570f910c76d429a3e5;p=gcc.git re PR target/91982 (gcc.target/aarch64/sve/clastb_*.c tests failing with segfault) 2019-10-04 Richard Biener 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e4f145af46..9a303c5dc9a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-10-04 Richard Biener + + 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 (value_range_from_overflowed_bounds): Rename from diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 31e745780ba..3db4a5cdf78 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -7901,7 +7901,10 @@ vectorizable_live_operation (stmt_vec_info stmt_info, 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) { diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index f997ad2b429..cac7410387b 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -10897,6 +10897,9 @@ vect_transform_stmt (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, 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 (STMT_VINFO_REDUC_DEF (orig_stmt_info)->stmt)) { gphi *phi = as_a (STMT_VINFO_REDUC_DEF (orig_stmt_info)->stmt);