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

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

https://gcc.gnu.org/g:075aadae398431b23d34dfc7204e297b8676dd59

commit r16-7241-g075aadae398431b23d34dfc7204e297b8676dd59
Author: Tamar Christina <[email protected]>
Date:   Mon Feb 2 11:03:53 2026 +0000

    middle-end: use destination type when folding addent [PR123897]

    Previously the types of the 3 operands would always be the same when you
get to
    convert_mult_to_fma_1.  However now they can differ untill we fold them to
be the
    same.  Using the type of the final expression is thus incorrect and any
    intermediate operations need to happen in the type of the expression being
    folded.

    gcc/ChangeLog:

            PR tree-optimization/123897
            * tree-ssa-math-opts.cc (convert_mult_to_fma_1): Use type of
variable
            being folded.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/123897
            * gcc.target/aarch64/sve/pr123897.c: New test.

Reply via email to