Commit fadb0136 by Richard Biener Committed by Richard Biener

re PR tree-optimization/91896 (ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1687)

2019-09-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/91896
	* tree-vect-loop.c (vectorizable_reduction): The single
	def-use cycle optimization cannot apply when there's more
	than one pattern stmt involved.

	* gcc.dg/torture/pr91896.c: New testcase.

From-SVN: r276123
parent 761e6bb9
2019-09-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/91896
* tree-vect-loop.c (vectorizable_reduction): The single
def-use cycle optimization cannot apply when there's more
than one pattern stmt involved.
2019-09-24 Iain Sandoe <iain@sandoe.co.uk> 2019-09-24 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/rs6000.md (load_macho_picbase_<mode>): New, using * config/rs6000/rs6000.md (load_macho_picbase_<mode>): New, using
......
2019-09-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/91896
* gcc.dg/torture/pr91896.c: New testcase.
2019-09-25 Martin Liska <mliska@suse.cz> 2019-09-25 Martin Liska <mliska@suse.cz>
* gcc.target/s390/pr91014.c: Move to ... * gcc.target/s390/pr91014.c: Move to ...
......
/* { dg-do compile } */
/* { dg-additional-options "-ftree-vectorize" } */
unsigned int
zj (unsigned int et)
{
signed char jr = 0;
do {
et *= 3;
jr += 2;
} while (jr >= 0);
if (et == (unsigned int) jr)
et = 0;
return et;
}
...@@ -6101,6 +6101,8 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, ...@@ -6101,6 +6101,8 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
if (ncopies > 1 if (ncopies > 1
&& STMT_VINFO_RELEVANT (reduc_stmt_info) <= vect_used_only_live && STMT_VINFO_RELEVANT (reduc_stmt_info) <= vect_used_only_live
&& (use_stmt_info = loop_vinfo->lookup_single_use (phi_result)) && (use_stmt_info = loop_vinfo->lookup_single_use (phi_result))
&& (!STMT_VINFO_IN_PATTERN_P (use_stmt_info)
|| !STMT_VINFO_PATTERN_DEF_SEQ (use_stmt_info))
&& vect_stmt_to_vectorize (use_stmt_info) == reduc_stmt_info) && vect_stmt_to_vectorize (use_stmt_info) == reduc_stmt_info)
single_defuse_cycle = true; single_defuse_cycle = true;
...@@ -6868,6 +6870,8 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, ...@@ -6868,6 +6870,8 @@ vectorizable_reduction (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
if (ncopies > 1 if (ncopies > 1
&& (STMT_VINFO_RELEVANT (stmt_info) <= vect_used_only_live) && (STMT_VINFO_RELEVANT (stmt_info) <= vect_used_only_live)
&& (use_stmt_info = loop_vinfo->lookup_single_use (reduc_phi_result)) && (use_stmt_info = loop_vinfo->lookup_single_use (reduc_phi_result))
&& (!STMT_VINFO_IN_PATTERN_P (use_stmt_info)
|| !STMT_VINFO_PATTERN_DEF_SEQ (use_stmt_info))
&& vect_stmt_to_vectorize (use_stmt_info) == stmt_info) && vect_stmt_to_vectorize (use_stmt_info) == stmt_info)
{ {
single_defuse_cycle = true; single_defuse_cycle = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment