https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121908
--- Comment #6 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:df0ac78ff1d7491019949b71abff662862bfbca6 commit r17-5480-gdf0ac78ff1d7491019949b71abff662862bfbca6 Author: Robin Dapp <[email protected]> Date: Fri Sep 18 10:03:16 2026 +0200 vect: Request no-wrap bounds from DR analysis. This patch makes use of the preparational patches and activates non-wrapping DR analysis. The resulting nowrap bounds for each DR are collected by taking the minimum and a final new assumption niter < bounds_min is ANDed into the niter assumptions. We cannot yet fully get rid of LOOP_C_FINITE but there is not a lot missing. I hope to finish that after this series. I needed to move DR analysis a bit earlier in order to re-use niter checks and dumps. We now retrieve the DRs directly after vect_analyze_loop_form, then build the assumptions and check them. Afterwards, the DRs are finalized. The vect tests are unchanged from my last patch attempt. Test 1-3 are based on 557.xz's hot loop. PR tree-optimization/121908 gcc/ChangeLog: * tree-vect-data-refs.cc (vect_find_stmt_data_reference): Allow non-wrapping DR analysis. * tree-vect-loop.cc (vect_analyze_loop_form): Defer assumption checking. (vect_get_loop_datarefs): New function. (vect_build_assumptions): New function. (vect_analyze_loop): Use new functions. * tree-vectorizer.h (struct vect_loop_form_info): Add BB param. gcc/testsuite/ChangeLog: * gcc.dg/tree-prof/update-loopch.c: Disable vectorization. * gcc.dg/tree-ssa/scev-12.c: Ditto. * gcc.dg/tree-ssa/scev-8.c: Ditto. * gcc.target/aarch64/sve2/niter-convert-range.c: Expect one more dump instance. * gcc.dg/vect/vect-unsigned-assump-1.c: New test. * gcc.dg/vect/vect-unsigned-assump-2.c: New test. * gcc.dg/vect/vect-unsigned-assump-3.c: New test. * gcc.dg/vect/vect-unsigned-assump-4.c: New test. * gcc.dg/vect/vect-unsigned-assump-5.c: New test. * gcc.dg/vect/vect-unsigned-assump-6.c: New test. * gcc.dg/vect/vect-unsigned-assump-7.c: New test. * gcc.dg/vect/vect-unsigned-assump-8.c: New test.
