tree-optimization/108970 - ICE with vectorizer peeling
The function slpeel_can_duplicate_loop_p fails to verify we can
copy blocks, instead slpeel_tree_duplicate_loop_to_edge_cfg does
but that's too late. The following fixes this, also simplifying
error reporting which is somewhat pointless if we ICE immediately.
PR tree-optimization/108970
* tree-vect-loop-manip.cc (slpeel_can_duplicate_loop_p):
Check we can copy the BBs.
(slpeel_tree_duplicate_loop_to_edge_cfg): Avoid redundant
check.
(vect_do_peeling): Streamline error handling.
* gcc.dg/pr108970.c: New testcase.