aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-slp.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-03-29 13:10:37 +0200
committerRichard Biener <rguenther@suse.de>2021-03-29 13:13:10 +0200
commit8cf2812cfceaf464dff99651b2d911d6e12b52b7 (patch)
treeb3a8e32bf54643133ee999acc840af2cd3d926c7 /gcc/tree-vect-slp.c
parent37d9074e12082132ae62c12fbe958c697f638c0a (diff)
downloadgcc-8cf2812cfceaf464dff99651b2d911d6e12b52b7.zip
gcc-8cf2812cfceaf464dff99651b2d911d6e12b52b7.tar.gz
gcc-8cf2812cfceaf464dff99651b2d911d6e12b52b7.tar.bz2
tree-optimization/99807 - avoid bogus assert with permute SLP node
This avoids asserting anything on the SLP_TREE_REPRESENTATIVE of an SLP permute node (which shouldn't be there). 2021-03-29 Richard Biener <rguenther@suse.de> PR tree-optimization/99807 * tree-vect-slp.c (vect_slp_analyze_node_operations_1): Move assert below VEC_PERM handling. * gfortran.dg/vect/pr99807.f90: New testcase.
Diffstat (limited to 'gcc/tree-vect-slp.c')
-rw-r--r--gcc/tree-vect-slp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index f1a2b5d..ceec7f5 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -3724,7 +3724,6 @@ vect_slp_analyze_node_operations_1 (vec_info *vinfo, slp_tree node,
stmt_vector_for_cost *cost_vec)
{
stmt_vec_info stmt_info = SLP_TREE_REPRESENTATIVE (node);
- gcc_assert (STMT_SLP_TYPE (stmt_info) != loop_vect);
/* Calculate the number of vector statements to be created for the
scalar stmts in this node. For SLP reductions it is equal to the
@@ -3760,6 +3759,7 @@ vect_slp_analyze_node_operations_1 (vec_info *vinfo, slp_tree node,
if (SLP_TREE_CODE (node) == VEC_PERM_EXPR)
return vectorizable_slp_permutation (vinfo, NULL, node, cost_vec);
+ gcc_assert (STMT_SLP_TYPE (stmt_info) != loop_vect);
if (is_a <bb_vec_info> (vinfo)
&& !vect_update_shared_vectype (stmt_info, SLP_TREE_VECTYPE (node)))
{