[Bug tree-optimization/108164] [12/13 Regression] wrong code with "-O3 -fno-tree-dce" on x86_64-linux-gnu since r12-5267-g540d92ae9b629eb4

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Dec 19 15:36:38 GMT 2022


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 <rguenth@gcc.gnu.org>:

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

commit r13-4794-gec459469f8a75d96a9b26694554efcc900d411de
Author: Richard Biener <rguenther@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.


More information about the Gcc-bugs mailing list