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

Tamar Christina <tnfchris at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[16 Regression] signed to   |[16 Regression] signed to
                   |unsigned type conversions   |unsigned type conversions
                   |inserted during             |inserted during
                   |vectorization blocking MLA  |vectorization blocking MLA
                   |                            |since r16-3328-g3182e95eda4

--- Comment #3 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Bisected to

commit 3182e95eda4a1d612b910b3248c997c8acc7add3
Author: Richard Biener <[email protected]>
Date:   Thu Jan 23 14:29:26 2025 +0100

    tree-optimization/111494 - reduction vectorization with signed UB

    The following makes sure to pun arithmetic that's used in vectorized
    reduction to unsigned when overflow invokes undefined behavior.

            PR tree-optimization/111494
            * gimple-fold.h (arith_code_with_undefined_signed_overflow):
Declare.
            * gimple-fold.cc (arith_code_with_undefined_signed_overflow):
Export.
            * tree-vect-stmts.cc (vectorizable_operation): Use unsigned
            arithmetic for operations participating in a reduction.

 gcc/gimple-fold.cc     |  2 +-
 gcc/gimple-fold.h      |  1 +
 gcc/tree-vect-stmts.cc | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 1 deletion(-)

Will take a look after christmas.

Reply via email to