diff options
author | Richard Biener <rguenther@suse.de> | 2019-09-20 08:35:59 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-09-20 08:35:59 +0000 |
commit | 6e222b2a3aede20f3093802d1649e75848e3bd2b (patch) | |
tree | d92612a64f3df35647f3c751c13aed50c425544b /gcc/tree-vect-loop.c | |
parent | d865ed7227a98bc1229d6e42bca35f605d6f4f75 (diff) | |
download | gcc-6e222b2a3aede20f3093802d1649e75848e3bd2b.zip gcc-6e222b2a3aede20f3093802d1649e75848e3bd2b.tar.gz gcc-6e222b2a3aede20f3093802d1649e75848e3bd2b.tar.bz2 |
re PR tree-optimization/91822 (FAIL: gcc.dg/pr88031.c (internal compiler error))
2019-09-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/91822
* tree-vectorizer.h (vectorizable_condition): Restore for_reduction
parameter.
* tree-vect-loop.c (vectorizable_reduction): Adjust asserts
for reduc_index in nested cycles, adjust vectorizable_condition
calls.
* tree-vect-stmts.c (vectorizable_condition): Restore for_reduction
parameter.
(vect_analyze_stmt): Adjust.
(vect_transform_stmt): Likewise.
From-SVN: r275990
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 9a4d960d..7e13986 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -6534,9 +6534,10 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, { /* Only call during the analysis stage, otherwise we'll lose STMT_VINFO_TYPE. */ - gcc_assert (reduc_index > 0); + gcc_assert (nested_cycle || reduc_index > 0); if (!vec_stmt && !vectorizable_condition (stmt_info, gsi, NULL, - reduc_index, NULL, cost_vec)) + true, reduc_index, + NULL, cost_vec)) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, @@ -6991,7 +6992,7 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, { gcc_assert (!slp_node && reduc_index > 0); return vectorizable_condition (stmt_info, gsi, vec_stmt, - reduc_index, NULL, NULL); + true, reduc_index, NULL, NULL); } /* Create the destination vector */ @@ -7021,8 +7022,8 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, { if (code == COND_EXPR) { - gcc_assert (!slp_node && reduc_index > 0); - vectorizable_condition (stmt_info, gsi, vec_stmt, + gcc_assert (!slp_node && (nested_cycle || reduc_index > 0)); + vectorizable_condition (stmt_info, gsi, vec_stmt, true, reduc_index, NULL, NULL); break; } |