From: Richard Biener Date: Tue, 19 Nov 2019 07:31:28 +0000 (+0000) Subject: re PR tree-optimization/92555 (ICE in exact_div, at poly-int.h:2162) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1e0c7e0eb3eafb122fc3d00242828c82a9286a2;p=gcc.git re PR tree-optimization/92555 (ICE in exact_div, at poly-int.h:2162) 2019-09-19 Richard Biener PR tree-optimization/92555 * tree-vect-loop.c (vect_update_vf_for_slp): Also scan PHIs for non-SLP stmts. * gcc.dg/vect/pr92555.c: New testcase. From-SVN: r278430 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab841a228cb..98f5c2fc49c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-09-19 Richard Biener + + PR tree-optimization/92555 + * tree-vect-loop.c (vect_update_vf_for_slp): Also scan PHIs + for non-SLP stmts. + 2019-11-19 Martin Liska PR bootstrap/92540 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d258749ef5b..05f38c2acd2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-09-19 Richard Biener + + PR tree-optimization/92555 + * gcc.dg/vect/pr92555.c: New testcase. + 2019-11-19 Joseph Myers * gcc.dg/c2x-attr-fallthrough-5.c, gcc.dg/c2x-attr-syntax-5.c: New diff --git a/gcc/testsuite/gcc.dg/vect/pr92555.c b/gcc/testsuite/gcc.dg/vect/pr92555.c new file mode 100644 index 00000000000..b174e1c612e --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr92555.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-fwrapv" } */ + +signed char rq; + +signed char +pu (int tr, int al) +{ + signed char x8; + + while (tr != 0) + { + for (x8 = 0; x8 >= 0; x8 += 2) + ; + + rq ^= al ^ 1; + ++x8; + ++tr; + } + + return x8; +} diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 02e6bfb9e5d..5ca6b551598 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -1398,6 +1398,18 @@ vect_update_vf_for_slp (loop_vec_info loop_vinfo) for (i = 0; i < nbbs; i++) { basic_block bb = bbs[i]; + for (gphi_iterator si = gsi_start_phis (bb); !gsi_end_p (si); + gsi_next (&si)) + { + stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (si.phi ()); + if (!stmt_info) + continue; + if ((STMT_VINFO_RELEVANT_P (stmt_info) + || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (stmt_info))) + && !PURE_SLP_STMT (stmt_info)) + /* STMT needs both SLP and loop-based vectorization. */ + only_slp_in_loop = false; + } for (gimple_stmt_iterator si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si)) {