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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:ec459469f8a75d96a9b26694554efcc900d411de

commit r13-4794-gec459469f8a75d96a9b26694554efcc900d411de
Author: Richard Biener <rguent...@suse.de>
Date:   Mon Dec 19 14:55:45 2022 +0100

    tree-optimization/108164 - undefined overflow with IV vectorization

    vect_update_ivs_after_vectorizer can end up emitting a signed
    IV update when the loop body performed an unsigned computation.
    The following makes sure to perform that update in the type
    of the loop update type to avoid undefined behavior on overflow.

            PR tree-optimization/108164
            * tree-vect-loop-manip.cc (vect_update_ivs_after_vectorizer):
            Perform vect_step_op_add update in the appropriate type.

            * gcc.dg/pr108164.c: New testcase.

Reply via email to