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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <[email protected]>:

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

commit r16-4500-gef8b3b979b6117eba9b39a7174f89b7297e8a1cd
Author: Richard Biener <[email protected]>
Date:   Fri Oct 17 14:03:21 2025 +0200

    tree-optimization/121631 - UB in vector epilogue

    The vectorizer fails to take UB due to signed overflow into account
    when generating code for the epilogue of a signed reduction.  The
    following tries to make sure to perform the actual reduction
    computations in an unsigned type.  I did not bother to adjust
    inputs to internal functions like .REDUC_PLUS.

            PR tree-optimization/121631
            * tree-vect-loop.cc (vect_create_epilog_for_reduction):
            When the reduction operation invokes UB on signed overflow
            make sure to perform operations with it on an unsigned type.
  • [Bug tree-optimization/121631] ... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to