gnu/gcc/bca597522679903c66f28afff49971663a37ab37 tree-optimization/126306 - delay BB vectorization SLP discovery soft fail
The following delays SLP discovery failure due to required unrolling
when doing BB vectorization to after we have also analyzed the
defs which can provide indication for where to best split the group.
This does not add meaningful to compile-time or eats from the SLP
discovery budget and can handle simple cases as shown in the testcase.
The case in the PR requires a followup which does have such downside.
PR tree-optimization/126306
* tree-vect-slp.cc (vect_build_slp_tree_1): Remove soft-failing.
(vect_build_slp_tree_2): Add soft-failing here, delayed
to after vect_get_and_check_slp_defs.
(vect_get_and_check_slp_defs): When we'll soft-fail do not
fall back to vect_external_def on mismatches.
* gcc.dg/vect/bb-slp-pr126306-1.c: New testcase.
2 files changed