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

            Bug ID: 120939
           Summary: vect_need_peeling_or_partial_vectors_p accesses not
                    yet computed LOOP_VINFO_COST_MODEL_THRESHOLD
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

We use that as

         /* In case of versioning, check if the maximum number of
             iterations is greater than th.  If they are identical,
             the epilogue is unnecessary.  */
          && (!LOOP_REQUIRES_VERSIONING (loop_vinfo)
              || ((unsigned HOST_WIDE_INT) max_niter
                  /* We'd like to use LOOP_VINFO_VERSIONING_THRESHOLD
                     but that's only computed later based on our result.
                     The following is the most conservative approximation.  */
                  > (std::max ((unsigned HOST_WIDE_INT) th,
                               const_vf) / const_vf) * const_vf))))

where also noticable we compare with > and fail to honor
the "If they are identical, the epilogue is unnecessary."

Reply via email to