diff options
author | Richard Biener <rguenther@suse.de> | 2019-11-07 11:49:09 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-11-07 11:49:09 +0000 |
commit | 084d390246c2172853f9e12ce04aef23cba79590 (patch) | |
tree | 22873d2678e8bfdc1b34e5e64bbdccc9226c956c /gcc | |
parent | 7313607478c11e9455a32fb0dbfd7867e04ea96a (diff) | |
download | gcc-084d390246c2172853f9e12ce04aef23cba79590.zip gcc-084d390246c2172853f9e12ce04aef23cba79590.tar.gz gcc-084d390246c2172853f9e12ce04aef23cba79590.tar.bz2 |
re PR tree-optimization/92405 (ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1683)
2019-11-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/92405
* tree-vect-loop.c (vectorizable_reduction): Appropriately
restrict lane-reducing ops to single stmt chains.
From-SVN: r277921
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-vect-loop.c | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4f5662d..55532cc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-11-07 Richard Biener <rguenther@suse.de> + + PR tree-optimization/92405 + * tree-vect-loop.c (vectorizable_reduction): Appropriately + restrict lane-reducing ops to single stmt chains. + 2019-11-07 Martin Jambor <mjambor@suse.cz> PR lto/70929 diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 788cc87..dfa087e 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -5865,6 +5865,18 @@ vectorizable_reduction (stmt_vec_info stmt_info, slp_tree slp_node, reduc_chain_length++; } + /* For lane-reducing ops we're reducing the number of reduction PHIs + which means the only use of that may be in the lane-reducing operation. */ + if (lane_reduc_code_p + && reduc_chain_length != 1 + && !only_slp_reduc_chain) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "lane-reducing reduction with extra stmts.\n"); + return false; + } + reduc_def = PHI_RESULT (reduc_def_phi); for (i = 0; i < op_type; i++) { |