aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-11-19 07:31:28 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-11-19 07:31:28 +0000
commitf1e0c7e0eb3eafb122fc3d00242828c82a9286a2 (patch)
tree21c12315aceb4dfb0b97f02dd472639af34b368d /gcc/tree-vect-loop.c
parente89a689f0a1b94083af100314373a6c2ef2c280e (diff)
downloadgcc-f1e0c7e0eb3eafb122fc3d00242828c82a9286a2.zip
gcc-f1e0c7e0eb3eafb122fc3d00242828c82a9286a2.tar.gz
gcc-f1e0c7e0eb3eafb122fc3d00242828c82a9286a2.tar.bz2
re PR tree-optimization/92555 (ICE in exact_div, at poly-int.h:2162)
2019-09-19 Richard Biener <rguenther@suse.de> 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
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 02e6bfb..5ca6b55 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))
{