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

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

https://gcc.gnu.org/g:18d2e513be7832fb08df59a5a1ee8dd6dadd2bd2

commit r17-5871-g18d2e513be7832fb08df59a5a1ee8dd6dadd2bd2
Author: Haochen Jiang <[email protected]>
Date:   Thu Oct 29 15:15:32 2026 +0800

    i386: Emit mask fma for conditional fma [PR128221]

    Previosly on trunk, we will emit fma + masked mov for conditional
    fma, it will get the correct result, but those masked values
    causing exception will be calculated under this scenario. Those
    thrown out excpetions are not expected. Use mask fma instead of fma
    to do that.

    After using mask fma, we lose some ablitiy to merge, do it directly
    in the new ix86_expand_cond_fma for some scenarios to avoid extra
    moves.

    gcc/ChangeLog:

            PR target/128221
            * config/i386/i386-expand.cc
            (ix86_expand_cond_fma): New function to expand conditional fma.
            * config/i386/i386-protos.h (ix86_expand_cond_fma): Ditto.
            * config/i386/sse.md
            (cond_fma<mode>): Use new ix86_expand_cond_fma.
            (cond_fms<mode>): Ditto.
            (cond_fnma<mode>): Ditto.
            (cond_fnms<mode>): Ditto.

    gcc/testsuite/ChangeLog:

            PR target/128221
            * gcc.target/i386/pr128221-1a.c: New test.
            * gcc.target/i386/pr128221-1b.c: Ditto.
            * gcc.target/i386/pr128221-2.c: Ditto.

Reply via email to