https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128689
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Robin Dapp <[email protected]>: https://gcc.gnu.org/g:b55cf3fda452a9a14dd2ea64a489099f6f70cb88 commit r17-6501-gb55cf3fda452a9a14dd2ea64a489099f6f70cb88 Author: Robin Dapp <[email protected]> Date: Wed Nov 18 13:19:55 2026 +0100 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.
