[Bug tree-optimization/126602] [17 Regression] error: invalid types in nop conversion with SVE fnms since r17-527-gca2920882be

"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]> Tue, 04 Aug 2026 14:24:31 +0000
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D126602

--- Comment #2 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:fdfe1570235b1bddc4572255ff161b5dc25cc460

commit r17-2945-gfdfe1570235b1bddc4572255ff161b5dc25cc460
Author: Tamar Christina <[email protected]>
Date:   Tue Aug 4 15:23:23 2026 +0100

    middle-end: fix condition on multiple negate pattern [PR126602]

    The optimization added in r17-527-gca2920882be has a bogus constraint w=
hich
    allows floating point FMAs through and folds them into integer ones. i.=
e.
we
    produce

    Matching expression match.pd:159, gimple-match-10.cc:33
    Matching expression match.pd:159, gimple-match-10.cc:33
    Applying pattern match.pd:10328, gimple-match-5.cc:8685
    gimple_simplified to _15 =3D (vector(8) unsigned int) a_6;
    _16 =3D (vector(8) unsigned int) _13;
    _17 =3D (vector(8) unsigned int) _1;
    _18 =3D .FNMA (_15, _16, _17);
    _3 =3D (svfloat32_t __attribute__((arm_sve_vector_bits(256)))) _18;
    Generated FMA _3 =3D (svfloat32_t __attribute__((arm_sve_vector_bits(25=
6))))
_18;

    Which ICEs because the SVE attributes don't match.

    This fixes the guard where I think the intention was for this to only a=
pply
to
    Integral types.

    gcc/ChangeLog:

            PR tree-optimization/126602
            * match.pd: Fix constraints.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/126602
            * gcc.target/aarch64/sve/pr126602.c: New test.=