vect: Don't version uncounted loops for no wrap [PR128689].
We currently just discard no-wrap assumptions we recorded for
an uncounted loop. As an uncounted loop doesn't have analyzed
niters, we can't easily build a guard condition.
While we might be able to tackle this in the future, this patch
doesn't try to record nowrap assumptions for an uncounted loop
and asserts that niter is analyzed in vect_build_assumptions.
PR tree-optimization/128689
gcc/ChangeLog:
* tree-vect-data-refs.cc (vect_find_stmt_data_reference): New
param.
* tree-vect-loop.cc (vect_get_datarefs_in_loop): Pass
vect_loop_form_info.
(vect_build_assumptions): Assert that niters was analyzed if we
have bounds.
(vect_analyze_loop): Pass loop_form_info.
* tree-vectorizer.h (vect_find_stmt_data_reference): Change
param to loop_form_info.
gcc/testsuite/ChangeLog:
* gcc.dg/vect/pr128689-2.c: New test.
* gcc.dg/vect/pr128689.c: New test.
5 files changed