With delaying soft-failing of SLP discovery we should make sure
the SLP discovery cache never ends up with non-failed nodes that
would need splitting.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
* tree-vect-slp.cc (vect_build_slp_tree): Assert successful
discovered nodes do not require splitting.
---
gcc/tree-vect-slp.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 88368b5b86c..3f88449cd1d 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -2030,6 +2030,10 @@ vect_build_slp_tree (vec_info *vinfo,
gcc_assert (res_ == res);
/* Keep a reference for the bst_map use. */
SLP_TREE_REF_COUNT (res)++;
+ /* For BB vectorization nodes that need splitting should be failed. */
+ gcc_assert (!is_a <bb_vec_info> (vinfo)
+ || multiple_p (group_size,
+ TYPE_VECTOR_SUBPARTS (res->vectype)));
}
return res_;
}
--
2.51.0