https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113588

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tamar Christina <tnfch...@gcc.gnu.org>:

https://gcc.gnu.org/g:85094e2aa6dba7908f053046f02dd443e8f65d72

commit r14-8768-g85094e2aa6dba7908f053046f02dd443e8f65d72
Author: Tamar Christina <tamar.christ...@arm.com>
Date:   Fri Feb 2 23:52:27 2024 +0000

    middle-end: check memory accesses in the destination block [PR113588].

    When analyzing loads for early break it was always the intention that for
the
    exit where things get moved to we only check the loads that can be reached
from
    the condition.

    However the main loop checks all loads and we skip the destination BB.  As
such
    we never actually check the loads reachable from the COND in the last BB
unless
    this BB was also the exit chosen by the vectorizer.

    This leads us to incorrectly vectorize the loop in the PR and in doing so
access
    out of bounds.

    gcc/ChangeLog:

            PR tree-optimization/113588
            PR tree-optimization/113467
            * tree-vect-data-refs.cc
            (vect_analyze_data_ref_dependence):  Choose correct dest and fix
checks.
            (vect_analyze_early_break_dependences): Update comments.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/113588
            PR tree-optimization/113467
            * gcc.dg/vect/vect-early-break_108-pr113588.c: New test.
            * gcc.dg/vect/vect-early-break_109-pr113588.c: New test.

Reply via email to