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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2026-01-07
                 CC|                            |contact at victordn dot me,
                   |                            |rdapp at gcc dot gnu.org

--- Comment #1 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Bisects to:

commit ca8d97f8cb8d282c190183e9c297d5e0490bab4e
Author: Victor Do Nascimento <[email protected]>
Date:   Thu May 8 15:28:05 2025 +0100

    vect: Relax known iteration number constraint

    At present we reject uncounted loops outright when doing initial loop
    analysis in `vect_analyze_loop_form'.

    We have the following gating condition that causes rejection of a
    given loop:

     if (integer_zerop (info->assumptions)
          || !info->number_of_iterations
          || chrec_contains_undetermined (info->number_of_iterations))

    We can do away with this check altogether, but not without problems,
    allowing many malformed loops through which ought to be rejected as
    early as possible.

    We observe that a common thread running through these malformed loops
    is the absence of any scalar evolution between iterations.

    We have therefore adjusted the analysis replacing the checks on
    `niters' for a test for the presence of scalar evolution in the loop,
    which can be detected via the presence of phi nodes in the loop.

    gcc/ChangeLog:

            * tree-vect-loop.cc (vect_analyze_loop_form): Relax niters
            condition.

Reply via email to