From: Richard Biener Date: Tue, 12 Nov 2019 12:08:07 +0000 (+0000) Subject: re PR tree-optimization/92461 (ICE: verify_ssa failed (error: excess use operand... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=830d1b18526dd1f085e8a2e1467a6dde18fc6434;p=gcc.git re PR tree-optimization/92461 (ICE: verify_ssa failed (error: excess use operand for statement)) 2019-11-12 Richard Biener PR tree-optimization/92461 * tree-vect-loop.c (vect_create_epilog_for_reduction): Update stmt after propagation. * gcc.dg/torture/pr92461.c: New testcase. From-SVN: r278093 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a56bdc130f2..ca125cf55ac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-11-12 Richard Biener + + PR tree-optimization/92461 + * tree-vect-loop.c (vect_create_epilog_for_reduction): Update + stmt after propagation. + 2019-11-12 Martin Liska * config/i386/i386-options.c (ix86_recompute_optlev_based_flags): diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8c63ddf5c0e..3fa8d213b3a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-11-12 Richard Biener + + PR tree-optimization/92461 + * gcc.dg/torture/pr92461.c: New testcase. + 2019-11-12 Martin Liska * gcc.dg/completion-3.c: Append = to all expected diff --git a/gcc/testsuite/gcc.dg/torture/pr92461.c b/gcc/testsuite/gcc.dg/torture/pr92461.c new file mode 100644 index 00000000000..1d059070682 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr92461.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-ftree-vectorize" } */ + +short int zb; + +void +gs (void) +{ + while (zb < 1) + { + int at; + + zb %= 1; + + for (at = 0; at < 56; ++at) + zb += zb; + + ++zb; + } +} diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index d0fb6c2aa66..29770db4545 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -5299,8 +5299,11 @@ vect_create_epilog_for_reduction (stmt_vec_info stmt_info, orig_name = PHI_RESULT (exit_phi); scalar_result = scalar_results[k]; FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, orig_name) - FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter) - SET_USE (use_p, scalar_result); + { + FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter) + SET_USE (use_p, scalar_result); + update_stmt (use_stmt); + } } phis.release ();